aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2016-01-30 14:20:56 -0800
committerPaul Eggert2016-01-30 15:26:07 -0800
commit874c59a81b7ee12a739149c5229e6d3bbd463324 (patch)
treee3a176adeb9f2bbf8d6ce2762b7fd670cb544dc7 /src
parent384ffef6434d3e8809abd3b5edc848db0333ba24 (diff)
downloademacs-874c59a81b7ee12a739149c5229e6d3bbd463324.tar.gz
emacs-874c59a81b7ee12a739149c5229e6d3bbd463324.zip
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).
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c5
-rw-r--r--src/unexcw.c4
2 files changed, 5 insertions, 4 deletions
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);
134#endif 134#endif
135 135
136extern void malloc_enable_thread (void); 136extern void malloc_enable_thread (void);
137extern void report_sheap_usage (int);
137 138
138/* If true, Emacs should not attempt to use a window-specific code, 139/* If true, Emacs should not attempt to use a window-specific code,
139 but instead should use the virtual terminal under which it was started. */ 140 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. */)
2073 tem = Vpurify_flag; 2074 tem = Vpurify_flag;
2074 Vpurify_flag = Qnil; 2075 Vpurify_flag = Qnil;
2075 2076
2077#ifdef HYBRID_MALLOC
2078 report_sheap_usage (1);
2079#endif
2080
2076 fflush (stdout); 2081 fflush (stdout);
2077 /* Tell malloc where start of impure now is. */ 2082 /* Tell malloc where start of impure now is. */
2078 /* Also arrange for warnings when nearly out of space. */ 2083 /* 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 <http://www.gnu.org/licenses/>. */
30 30
31#define DOTEXE ".exe" 31#define DOTEXE ".exe"
32 32
33extern void report_sheap_usage (int);
34
35extern int bss_sbrk_did_unexec; 33extern int bss_sbrk_did_unexec;
36 34
37/* 35/*
@@ -276,8 +274,6 @@ unexec (const char *outfile, const char *infile)
276 int ret; 274 int ret;
277 int ret2; 275 int ret2;
278 276
279 report_sheap_usage (1);
280
281 infile = add_exe_suffix_if_necessary (infile, infile_buffer); 277 infile = add_exe_suffix_if_necessary (infile, infile_buffer);
282 outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer); 278 outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer);
283 279