mirror of https://gitee.com/bigwinds/arangodb
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:
parent
9ba875989b
commit
8667a8e001
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue