From: Paul Eggert Date: Sat, 30 Jan 2016 22:20:56 +0000 (-0800) Subject: Report static heap usage on non-Cygwin, too X-Git-Tag: emacs-26.0.90~2782 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=874c59a81b7ee12a739149c5229e6d3bbd463324;p=emacs.git 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). --- diff --git a/src/emacs.c b/src/emacs.c index fb6f896a639..7ba5cfeb2e5 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. */ @@ -2073,6 +2074,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 febe939d9d3..e4aa3565688 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);