1
0
Fork 0

when returning memory to the OS, use some memory protection flags as when initializing the memory

this prevents "hole punching" and keeps the OS from splitting one memory mapping into multiple mappings with different protection settings
This commit is contained in:
jsteemann 2018-10-02 11:29:03 +02:00
parent de10c4abba
commit dca4615c3f
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ static size_t os_page;
#ifndef _WIN32
# define PAGES_PROT_COMMIT (PROT_READ | PROT_WRITE)
# define PAGES_PROT_DECOMMIT (PROT_NONE)
# define PAGES_PROT_DECOMMIT (PROT_READ | PROT_WRITE)
static int mmap_flags;
#endif
static bool os_overcommits;