]> git.eshelyaron.com Git - emacs.git/commitdiff
(main): Call memory_warnings and uninterrupt_malloc
authorRichard M. Stallman <rms@gnu.org>
Tue, 29 Dec 1998 22:53:54 +0000 (22:53 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 29 Dec 1998 22:53:54 +0000 (22:53 +0000)
even when starting the dumped Emacs.

src/emacs.c

index 8d10e17a50d25f92c9f6570f3265209b367c802b..dec656e87523ea4a485a26e26501a81955beff05 100644 (file)
@@ -707,15 +707,14 @@ main (argc, argv, envp)
   clearerr (stdin);
 
 #ifndef SYSTEM_MALLOC
-  if (! initialized)
-    {
-      /* Arrange to get warning messages as memory fills up.  */
-      memory_warnings (0, malloc_warning);
+  /* Arrange to get warning messages as memory fills up.  */
+  memory_warnings (0, malloc_warning);
 
-      /* Arrange to disable interrupt input while malloc and friends are
-        running.  */
-      uninterrupt_malloc ();
-    }
+  /* Call malloc at least once, to run the initial __malloc_hook.  */
+  malloc (4);
+
+  /* Arrange to disable interrupt input inside malloc etc.  */
+  uninterrupt_malloc ();
 #endif /* not SYSTEM_MALLOC */
 
 #ifdef MSDOS