diff options
| author | Jason Evans <jasone@canonware.com> | 2017-04-17 22:54:53 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2017-04-17 23:41:01 (GMT) |
| commit | a01f99307719dcc8ca27cc70f0f0011beff914fa (patch) | |
| tree | 914fcbd17dcad97aa2b5984aef5871151570da82 | |
| parent | c43a83d225551273c30c087ba90cbe2ca3c15e55 (diff) | |
| download | jemalloc-a01f99307719dcc8ca27cc70f0f0011beff914fa.zip jemalloc-a01f99307719dcc8ca27cc70f0f0011beff914fa.tar.gz jemalloc-a01f99307719dcc8ca27cc70f0f0011beff914fa.tar.bz2 | |
Only disable munmap(2) by default on 64-bit Linux.
This reduces the likelihood of address space exhaustion on 32-bit
systems.
This resolves #350.
| -rw-r--r-- | INSTALL | 8 | ||||
| -rw-r--r-- | configure.ac | 8 |
2 files changed, 11 insertions, 5 deletions
@@ -161,9 +161,11 @@ any of the following arguments (not a definitive list) to 'configure': --disable-munmap Disable virtual memory deallocation via munmap(2); instead keep track of the virtual memory for later use. munmap() is disabled by default (i.e. - --disable-munmap is implied) on Linux, which has a quirk in its virtual - memory allocation algorithm that causes semi-permanent VM map holes under - normal jemalloc operation. + --disable-munmap is implied) on [64-bit] Linux, which has a quirk in its + virtual memory allocation algorithm that causes semi-permanent VM map holes + under normal jemalloc operation. Although munmap() causes issues on 32-bit + Linux as well, it is not disabled by default due to the practical + possibility of address space exhaustion. --disable-fill Disable support for junk/zero filling of memory. See the "opt.junk" and diff --git a/configure.ac b/configure.ac index a3cfc88..f6d08cc 100644 --- a/configure.ac +++ b/configure.ac @@ -557,7 +557,9 @@ case "${host}" in AC_DEFINE([JEMALLOC_THREADED_INIT], [ ]) AC_DEFINE([JEMALLOC_C11_ATOMICS]) force_tls="0" - default_munmap="0" + if "${LG_SIZEOF_PTR}" = "3"; then + default_munmap="0" + fi ;; *-*-linux* | *-*-kfreebsd*) dnl syscall(2) and secure_getenv(3) are exposed by _GNU_SOURCE. @@ -568,7 +570,9 @@ case "${host}" in AC_DEFINE([JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY], [ ]) AC_DEFINE([JEMALLOC_THREADED_INIT], [ ]) AC_DEFINE([JEMALLOC_USE_CXX_THROW], [ ]) - default_munmap="0" + if "${LG_SIZEOF_PTR}" = "3"; then + default_munmap="0" + fi ;; *-*-netbsd*) AC_MSG_CHECKING([ABI]) |
