summaryrefslogtreecommitdiff
path: root/src/ralloc.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-05-16 05:35:04 +0000
committerRichard M. Stallman <rms@gnu.org>1997-05-16 05:35:04 +0000
commitbceeb1a9751c54e6fe368937f85898ec4d674a3d (patch)
treeb3e64e0cbc34b2faffd17837f14256e5eabbaf27 /src/ralloc.c
parent231764516dee3c7dd475bc8194deb093ce37772a (diff)
downloademacs-bceeb1a9751c54e6fe368937f85898ec4d674a3d.tar.gz
(mallopt): Declare, if appropriate.
(r_alloc_init) [DOUG_LEA_MALLOC]: Call mallopt, instead of setting __malloc_extra_blocks.
Diffstat (limited to 'src/ralloc.c')
-rw-r--r--src/ralloc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ralloc.c b/src/ralloc.c
index 179fd314928..5373212a483 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -57,7 +57,12 @@ typedef unsigned long SIZE;
overlap. */
extern void safe_bcopy ();
+#ifdef DOUG_LEA_MALLOC
+#define M_TOP_PAD -2
+extern int mallopt ();
+#else
extern int __malloc_extra_blocks;
+#endif
#else /* not emacs */
@@ -1119,9 +1124,13 @@ r_alloc_init ()
page_size = PAGE;
extra_bytes = ROUNDUP (50000);
+#ifdef DOUG_LEA_MALLOC
+ mallopt (M_TOP_PAD, 64 * 4096);
+#else
/* Give GNU malloc's morecore some hysteresis
so that we move all the relocatable blocks much less often. */
__malloc_extra_blocks = 64;
+#endif
first_heap->end = (POINTER) ROUNDUP (first_heap->start);