madvise arguments are not flags. (#470)

You can't or together multiple `madvise` flags in a single call.
This commit is contained in:
David Chisnall
2022-03-03 13:58:37 +00:00
committed by GitHub
parent 322e74fae3
commit 1a75316ba2

View File

@@ -67,7 +67,8 @@ namespace snmalloc
if constexpr (DEBUG)
memset(p, 0x5a, size);
madvise(p, size, MADV_FREE | MADV_NOCORE);
madvise(p, size, MADV_NOCORE);
madvise(p, size, MADV_FREE);
if constexpr (PalEnforceAccess)
{