diff --git a/INSTALL b/INSTALL index d7496612..042f8291 100644 --- a/INSTALL +++ b/INSTALL @@ -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 a3cfc88f..f6d08ccd 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])