8000 when returning memory to the OS, use some memory protection flags as … · 0xflotus/arangodb@8667a8e · GitHub
[go: up one dir, main page]

Skip to content

Commit 8667a8e

Browse files
committed
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
1 parent 9ba8759 commit 8667a8e

File tree

1 file changed

+1
-1
lines changed
  • 3rdParty/jemalloc/v5.1.0/src

1 file changed

+1
-1
lines changed

3rdParty/jemalloc/v5.1.0/src/pages.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static size_t os_page;
2323

2424
#ifndef _WIN32
2525
# define PAGES_PROT_COMMIT (PROT_READ | PROT_WRITE)
26-
# define PAGES_PROT_DECOMMIT (PROT_NONE)
26+
# define PAGES_PROT_DECOMMIT (PROT_READ | PROT_WRITE)
2727
static int mmap_flags;
2828
#endif
2929
static bool os_overcommits;

0 commit comments

Comments
 (0)
0