]> git.eshelyaron.com Git - emacs.git/commitdiff
(main): [!SYSTEM_MALLOC]: Call realloc and free as well
authorAndrew Innes <andrewi@gnu.org>
Sat, 20 Feb 1999 20:43:58 +0000 (20:43 +0000)
committerAndrew Innes <andrewi@gnu.org>
Sat, 20 Feb 1999 20:43:58 +0000 (20:43 +0000)
as malloc before calling uninterrupt_malloc, for consistency.
This also enables profiling to work on WINDOWSNT.

src/emacs.c

index bda8070fa5d7b5861875b6b7b997e079324727d6..d01f55aa393eb18de0a0c84f5ce39de1bc9fd930 100644 (file)
@@ -709,8 +709,9 @@ main (argc, argv, envp)
   /* Arrange to get warning messages as memory fills up.  */
   memory_warnings (0, malloc_warning);
 
-  /* Call malloc at least once, to run the initial __malloc_hook.  */
-  malloc (4);
+  /* Call malloc at least once, to run the initial __malloc_hook.
+     Also call realloc and free for consistency.  */
+  free (realloc (malloc (4), 4));
 
   /* Arrange to disable interrupt input inside malloc etc.  */
   uninterrupt_malloc ();