aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/jemalloc/internal/jemalloc_internal_defs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal_defs.h b/include/jemalloc/internal/jemalloc_internal_defs.h
index 052bd11c..37ab466f 100644
--- a/include/jemalloc/internal/jemalloc_internal_defs.h
+++ b/include/jemalloc/internal/jemalloc_internal_defs.h
@@ -237,7 +237,12 @@
* common sequences of mmap()/munmap() calls will cause virtual memory map
* holes.
*/
+#if defined(__LP64__)
+// Only use retain for 64 bit since virtual memory can be exhausted
+// very easily when running in 32 bit.
+// See b/142556796.
#define JEMALLOC_RETAIN
+#endif
/* TLS is used to map arenas and magazine caches to threads. */
/* #undef JEMALLOC_TLS */