]> code.delx.au - gnu-emacs/commitdiff
Report static heap usage on non-Cygwin, too
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 30 Jan 2016 22:20:56 +0000 (14:20 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 30 Jan 2016 23:26:07 +0000 (15:26 -0800)
* 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
src/unexcw.c

index fb6f896a6393bc2e64790e229e6b868a66e912db..7ba5cfeb2e5ae12cc848401d0caeb409657bf7c3 100644 (file)
@@ -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.  */
index febe939d9d3f68d22e8216e755875a7e83aff0ad..e4aa35656889e92ab238531319360ca0b5cda182 100644 (file)
@@ -30,8 +30,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #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);