mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-31 09:20:54 -08:00
(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.
This commit is contained in:
parent
95382f4224
commit
f5a3c8c45d
1 changed files with 3 additions and 2 deletions
|
|
@ -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 ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue