diff options
| author | Eli Zaretskii | 2014-05-29 18:21:08 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-05-29 18:21:08 +0300 |
| commit | d2ff520ae44eaa9c21bb5c5069ff393b0b99eb60 (patch) | |
| tree | 6e8104c5dfe066d08d64388d88627b90b5fd7aca /src/w32heap.c | |
| parent | 035159ed54cf2e1abc0439fbb6e628c9223f8e5d (diff) | |
| download | emacs-d2ff520ae44eaa9c21bb5c5069ff393b0b99eb60.tar.gz emacs-d2ff520ae44eaa9c21bb5c5069ff393b0b99eb60.zip | |
Add diagnostics for using private heap on MS-Windows during dumping.
src/w32heap.c (report_temacs_memory_usage): New function.
src/unexw32.c (unexec) [ENABLE_CHECKING]: Call report_temacs_memory_usage.
src/w32heap.h (report_temacs_memory_usage): Add prototype.
Diffstat (limited to 'src/w32heap.c')
| -rw-r--r-- | src/w32heap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/w32heap.c b/src/w32heap.c index 7cce7c50319..be097901747 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -448,6 +448,19 @@ free_before_dump (void *ptr) | |||
| 448 | } | 448 | } |
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | #ifdef ENABLE_CHECKING | ||
| 452 | void | ||
| 453 | report_temacs_memory_usage (void) | ||
| 454 | { | ||
| 455 | /* Emulate 'message', which writes to stderr in non-interactive | ||
| 456 | sessions. */ | ||
| 457 | fprintf (stderr, | ||
| 458 | "Dump memory usage: Heap: %" PRIu64 " Large blocks(%lu): %" PRIu64 "\n", | ||
| 459 | (unsigned long long)committed, blocks_number, | ||
| 460 | (unsigned long long)(dumped_data + DUMPED_HEAP_SIZE - bc_limit)); | ||
| 461 | } | ||
| 462 | #endif | ||
| 463 | |||
| 451 | /* Emulate getpagesize. */ | 464 | /* Emulate getpagesize. */ |
| 452 | int | 465 | int |
| 453 | getpagesize (void) | 466 | getpagesize (void) |