aboutsummaryrefslogtreecommitdiffstats
path: root/src/ralloc.c
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-12 07:04:43 +0000
committerRichard M. Stallman1997-07-12 07:04:43 +0000
commitdec414188f5a04db0ac23ba29515de0a1f3ed4b8 (patch)
treec49cbf705f1ab722df4d9b16302c1e1ac71adedb /src/ralloc.c
parent3d976a9a2b676411ead10a5e598f55da103a8134 (diff)
downloademacs-dec414188f5a04db0ac23ba29515de0a1f3ed4b8.tar.gz
emacs-dec414188f5a04db0ac23ba29515de0a1f3ed4b8.zip
(r_alloc_reinit): New function.
Diffstat (limited to 'src/ralloc.c')
-rw-r--r--src/ralloc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ralloc.c b/src/ralloc.c
index 5373212a483..d1ce3be24fc 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -1150,6 +1150,24 @@ r_alloc_init ()
1150 virtual_break_value = break_value = first_heap->bloc_start = first_heap->end; 1150 virtual_break_value = break_value = first_heap->bloc_start = first_heap->end;
1151 use_relocatable_buffers = 1; 1151 use_relocatable_buffers = 1;
1152} 1152}
1153
1154#if defined (emacs) && defined (DOUG_LEA_MALLOC)
1155
1156/* Reinitialize the morecore hook variables after restarting a dumped
1157 Emacs. This is needed when using Doug Lea's malloc from GNU libc. */
1158void
1159r_alloc_reinit ()
1160{
1161 /* Only do this if the hook has been reset, so that we don't get an
1162 infinite loop, in case Emacs was linked statically. */
1163 if (__morecore != r_alloc_sbrk)
1164 {
1165 real_morecore = __morecore;
1166 __morecore = r_alloc_sbrk;
1167 }
1168}
1169#endif
1170
1153#ifdef DEBUG 1171#ifdef DEBUG
1154#include <assert.h> 1172#include <assert.h>
1155 1173