diff options
| author | Richard M. Stallman | 1997-05-16 05:35:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-05-16 05:35:04 +0000 |
| commit | b0119c682530d420cd07e6b4bb5f4d52904de47d (patch) | |
| tree | 03d5bddf6ab14d05113839cbbc56f210c0e59801 /src/ralloc.c | |
| parent | b8a9ebfb3ffb72880589ed3b98b8d97af3acbb10 (diff) | |
| download | emacs-b0119c682530d420cd07e6b4bb5f4d52904de47d.tar.gz emacs-b0119c682530d420cd07e6b4bb5f4d52904de47d.zip | |
(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.c | 9 |
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; | |||
| 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 | ||
| @@ -1119,9 +1124,13 @@ r_alloc_init () | |||
| 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 | ||