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.
+2014-05-29 Eli Zaretskii <eliz@gnu.org>
+
+ * w32heap.c (report_temacs_memory_usage): New function.
+
+ * unexw32.c (unexec) [ENABLE_CHECKING]: Call
+ report_temacs_memory_usage.
+
+ * w32heap.h (report_temacs_memory_usage): Add prototype.
+
2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
abort ();
strcpy (p, q);
+#ifdef ENABLE_CHECKING
+ report_temacs_memory_usage ();
+#endif
+
/* Make sure that the output filename has the ".exe" extension...patch
it up if not. */
p = out_filename + strlen (out_filename) - 4;
}
}
+#ifdef ENABLE_CHECKING
+void
+report_temacs_memory_usage (void)
+{
+ /* Emulate 'message', which writes to stderr in non-interactive
+ sessions. */
+ fprintf (stderr,
+ "Dump memory usage: Heap: %" PRIu64 " Large blocks(%lu): %" PRIu64 "\n",
+ (unsigned long long)committed, blocks_number,
+ (unsigned long long)(dumped_data + DUMPED_HEAP_SIZE - bc_limit));
+}
+#endif
+
/* Emulate getpagesize. */
int
getpagesize (void)
extern void mmap_free (void **);
extern void *mmap_alloc (void **, size_t);
+extern void report_temacs_memory_usage (void);
/* Emulation of Unix sbrk(). */
extern void *sbrk (ptrdiff_t size);