From 06ca62eb6432d01fb4fa3ffe741bbeee0f9ca0bd Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 11 Dec 2004 21:53:33 +0000 Subject: [PATCH 1/1] (main, Fdump_emacs): Don't touch malloc hooks if SYNC_INPUT. --- src/emacs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/emacs.c b/src/emacs.c index 8e2443e8f1..9fde3a6ed4 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1023,8 +1023,10 @@ main (argc, argv Also call realloc and free for consistency. */ free (realloc (malloc (4), 4)); +# ifndef SYNC_INPUT /* Arrange to disable interrupt input inside malloc etc. */ uninterrupt_malloc (); +# endif /* not SYNC_INPUT */ #endif /* not SYSTEM_MALLOC */ #if defined (MSDOS) || defined (WINDOWSNT) @@ -2238,7 +2240,7 @@ You must run Emacs in batch mode in order to dump it. */) memory_warnings (my_edata, malloc_warning); #endif /* not WINDOWSNT */ #endif -#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) +#if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT /* Pthread may call malloc before main, and then we will get an endless loop, because pthread_self (see alloc.c) calls malloc the first time it is called on some systems. */ -- 2.20.1