From: Andrew Innes Date: Sat, 20 Feb 1999 20:43:58 +0000 (+0000) Subject: (main): [!SYSTEM_MALLOC]: Call realloc and free as well X-Git-Tag: emacs-20.4~585 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f5a3c8c45d1dfdf16d2dd4011bd0128cdfd61027;p=emacs.git (main): [!SYSTEM_MALLOC]: Call realloc and free as well as malloc before calling uninterrupt_malloc, for consistency. This also enables profiling to work on WINDOWSNT. --- diff --git a/src/emacs.c b/src/emacs.c index bda8070fa5d..d01f55aa393 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -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 ();