comparison src/ralloc.c @ 17845:ac6367122ee2

(mallopt): Declare, if appropriate. (r_alloc_init) [DOUG_LEA_MALLOC]: Call mallopt, instead of setting __malloc_extra_blocks.
author Richard M. Stallman <rms@gnu.org>
date Fri, 16 May 1997 05:35:04 +0000
parents 36e4b3043730
children 9d6149f4c762
comparison
equal deleted inserted replaced
17844:d37bf1f56b05 17845:ac6367122ee2
55 55
56 /* Declared in dispnew.c, this version doesn't screw up if regions 56 /* Declared in dispnew.c, this version doesn't screw up if regions
57 overlap. */ 57 overlap. */
58 extern void safe_bcopy (); 58 extern void safe_bcopy ();
59 59
60 #ifdef DOUG_LEA_MALLOC
61 #define M_TOP_PAD -2
62 extern int mallopt ();
63 #else
60 extern int __malloc_extra_blocks; 64 extern int __malloc_extra_blocks;
65 #endif
61 66
62 #else /* not emacs */ 67 #else /* not emacs */
63 68
64 #include <stddef.h> 69 #include <stddef.h>
65 70
1117 abort (); 1122 abort ();
1118 1123
1119 page_size = PAGE; 1124 page_size = PAGE;
1120 extra_bytes = ROUNDUP (50000); 1125 extra_bytes = ROUNDUP (50000);
1121 1126
1127 #ifdef DOUG_LEA_MALLOC
1128 mallopt (M_TOP_PAD, 64 * 4096);
1129 #else
1122 /* Give GNU malloc's morecore some hysteresis 1130 /* Give GNU malloc's morecore some hysteresis
1123 so that we move all the relocatable blocks much less often. */ 1131 so that we move all the relocatable blocks much less often. */
1124 __malloc_extra_blocks = 64; 1132 __malloc_extra_blocks = 64;
1133 #endif
1125 1134
1126 first_heap->end = (POINTER) ROUNDUP (first_heap->start); 1135 first_heap->end = (POINTER) ROUNDUP (first_heap->start);
1127 1136
1128 /* The extra call to real_morecore guarantees that the end of the 1137 /* The extra call to real_morecore guarantees that the end of the
1129 address space is a multiple of page_size, even if page_size is 1138 address space is a multiple of page_size, even if page_size is