changeset 18757:9d6149f4c762

(r_alloc_reinit): New function.
author Richard M. Stallman <rms@gnu.org>
date Sat, 12 Jul 1997 07:04:43 +0000
parents 751f531e5a20
children 231be0c398fd
files src/ralloc.c
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ralloc.c	Sat Jul 12 06:52:06 1997 +0000
+++ b/src/ralloc.c	Sat Jul 12 07:04:43 1997 +0000
@@ -1150,6 +1150,24 @@
   virtual_break_value = break_value = first_heap->bloc_start = first_heap->end;
   use_relocatable_buffers = 1;
 }
+
+#if defined (emacs) && defined (DOUG_LEA_MALLOC)
+
+/* Reinitialize the morecore hook variables after restarting a dumped
+   Emacs.  This is needed when using Doug Lea's malloc from GNU libc.  */
+void
+r_alloc_reinit ()
+{
+  /* Only do this if the hook has been reset, so that we don't get an
+     infinite loop, in case Emacs was linked statically.  */
+  if (__morecore != r_alloc_sbrk)
+    {
+      real_morecore = __morecore;
+      __morecore = r_alloc_sbrk;
+    }
+}
+#endif
+
 #ifdef DEBUG
 #include <assert.h>