We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3218792 commit fa1e328Copy full SHA for fa1e328
src/pal/pal_haiku.h
@@ -35,7 +35,13 @@ namespace snmalloc
35
static void notify_not_using(void* p, size_t size) noexcept
36
{
37
SNMALLOC_ASSERT(is_aligned_block<page_size>(p, size));
38
- posix_madvise(p, size, POSIX_MADV_DONTNEED);
+# ifdef USE_POSIX_COMMIT_CHECKS
39
+ memset(p, 0x5a, size);
40
+# endif
41
+ madvise(p, size, MADV_FREE);
42
43
+ mprotect(p, size, PROT_NONE);
44
45
}
46
};
47
} // namespace snmalloc
0 commit comments