We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01b282a commit 3ca29d6Copy full SHA for 3ca29d6
1 file changed
src/pal/pal_posix.h
@@ -135,6 +135,9 @@ namespace snmalloc
135
{
136
SNMALLOC_ASSERT(is_aligned_block<OS::page_size>(p, size));
137
#ifdef USE_POSIX_COMMIT_CHECKS
138
+ // Fill memory so that when we switch the pages back on we don't make
139
+ // assumptions on the content.
140
+ memset(p, 0x5a, size);
141
mprotect(p, size, PROT_NONE);
142
#else
143
UNUSED(p);
0 commit comments