>From 3db9402fe355eb2ea60837148a0426bd41df09d1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 30 Jan 2016 00:47:25 -0800 Subject: [PATCH 06/12] Report static heap usage on non-Cygwin, too * src/emacs.c (Fdump_emacs) [HYBRID_MALLOC]: Report sheap usage here ... * src/unexcw.c (unexec): ... instead of here, since sheap can be used on platforms other than Cygwin (Bug#22086). --- src/emacs.c | 5 +++++ src/unexcw.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index e3cfad0..40075b4 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -134,6 +134,7 @@ extern void unexec_init_emacs_zone (void); #endif extern void malloc_enable_thread (void); +extern void report_sheap_usage (int); /* If true, Emacs should not attempt to use a window-specific code, but instead should use the virtual terminal under which it was started. */ @@ -2070,6 +2071,10 @@ You must run Emacs in batch mode in order to dump it. */) tem = Vpurify_flag; Vpurify_flag = Qnil; +#ifdef HYBRID_MALLOC + report_sheap_usage (1); +#endif + fflush (stdout); /* Tell malloc where start of impure now is. */ /* Also arrange for warnings when nearly out of space. */ diff --git a/src/unexcw.c b/src/unexcw.c index febe939..e4aa356 100644 --- a/src/unexcw.c +++ b/src/unexcw.c @@ -30,8 +30,6 @@ along with GNU Emacs. If not, see . */ #define DOTEXE ".exe" -extern void report_sheap_usage (int); - extern int bss_sbrk_did_unexec; /* @@ -276,8 +274,6 @@ unexec (const char *outfile, const char *infile) int ret; int ret2; - report_sheap_usage (1); - infile = add_exe_suffix_if_necessary (infile, infile_buffer); outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer); -- 2.5.0