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 9ba875989b
commit 8667a8e001
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,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;