summaryrefslogtreecommitdiff
path: root/malloc/arena.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-08-22 06:19:12 +0000
committerUlrich Drepper <drepper@redhat.com>2006-08-22 06:19:12 +0000
commite404fb16fc35210219159a446f7c993760a37316 (patch)
treeb111528ec288146613b4cac260bb58372ed47da5 /malloc/arena.c
parent376e973ad66993e7b5dbdfd173c399e1af3a1add (diff)
* malloc/malloc.c (DEFAULT_MMAP_THRESHOLD_MAX): For 32-bit
platforms define as 1MB. For 64-bit platforms as 32MB. The lower limit is needed to avoid the exploding of the address space requirement for secondary heaps. * malloc/arena.c (HEAP_MAX_SIZE): Define using DEFAULT_MMAP_THRESHOLD_MAX if it is defined.
Diffstat (limited to 'malloc/arena.c')
-rw-r--r--malloc/arena.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index 6f0a9df8f1..e96b3b42a6 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -24,7 +24,11 @@
#define HEAP_MIN_SIZE (32*1024)
#ifndef HEAP_MAX_SIZE
-#define HEAP_MAX_SIZE (1024*1024) /* must be a power of two */
+# ifdef DEFAULT_MMAP_THRESHOLD_MAX
+# define HEAP_MAX_SIZE DEFAULT_MMAP_THRESHOLD_MAX
+# else
+# define HEAP_MAX_SIZE (1024*1024) /* must be a power of two */
+# endif
#endif
/* HEAP_MIN_SIZE and HEAP_MAX_SIZE limit the size of mmap()ed heaps