When using dmalloc, dump the top ten memory consumers to the _DMALLOC_ logfile when we get a SIGUSR1. Hint: it is not what you would think.
svn:r12613
to build a descriptor with no intro points (and it would have
crashed if we had tried to parse one). Bugfix on 0.2.0.x; patch
by Karsten Loesing.
+ - Fix building with dmalloc 5.5.2 with glibc.
+
+ o Minor features:
+ - On USR1, when dmalloc is in use, log the top 10 memory consumers.
Changes in version 0.2.0.12-alpha - 2007-11-16
* Memory management
* ===== */
#ifdef USE_DMALLOC
+ #undef strndup
#include <dmalloc.h>
#define DMALLOC_FN_ARGS , file, line
+ #define dmalloc_strdup(file, line, string, xalloc_b) dmalloc_strndup(file, line, (string), -1, xalloc_b)
#else
#define dmalloc_strdup(file, line, string, xalloc_b) strdup(string)
#else
(void)severity;
#endif
+#ifdef USE_DMALLOC
+ dmalloc_log_stats();
+ // too wordy dmalloc_log_unfreed();
+#endif
}
/* =====