aboutsummaryrefslogtreecommitdiff
path: root/malloc/arena.c
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/arena.c')
-rw-r--r--malloc/arena.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index c63cb70..05df8c1 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -331,7 +331,13 @@ ptmalloc_init (void)
if (TUNABLE_GET_FULL (glibc, mem, cap_narrowing, int32_t, NULL) == 0)
cap_narrowing_enabled = false;
else
- cap_narrowing_enabled = true;
+ {
+ cap_narrowing_enabled = true;
+# ifdef __CAP_MMAP_THRESHOLD
+ /* Default mmap threshold to avoid heap fragmentation. */
+ do_set_mmap_threshold (__CAP_MMAP_THRESHOLD);
+# endif
+ }
#endif
cap_init ();