diff options
author | Chris Wilson <chris+github@qwirx.com> | 2013-02-13 00:27:54 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2013-02-13 00:27:54 +0000 |
commit | 51d63d54c9ab3a0d53760e0e8a6a5ac57963dd36 (patch) | |
tree | 1f4eb179bb8c3c1f63d178e81b301399c7a29729 /lib/common/MemLeakFinder.h | |
parent | 24edb39601fa14de8d8ba3308fd9ec5377c815b8 (diff) |
Add ability to generate memory usage reports while running.
* ./configure CXXFLAGS=-DDEBUG_LEAKS
* Build and run the binary as normal (release or debug)
* Send SIGUSR1 to the process (e.g. killall -USR1 bbstored)
* Check the system logs, or the console.
Not safe for use on a production process, as it does illegal things in
a signal handler that may result in the process hanging. Use only for
debugging, and be prepared to kill any stuck processes.
Diffstat (limited to 'lib/common/MemLeakFinder.h')
-rw-r--r-- | lib/common/MemLeakFinder.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/common/MemLeakFinder.h b/lib/common/MemLeakFinder.h index ca207bd5..91c93217 100644 --- a/lib/common/MemLeakFinder.h +++ b/lib/common/MemLeakFinder.h @@ -36,6 +36,8 @@ void memleakfinder_init(); int memleakfinder_numleaks(); +void memleakfinder_report_usage_summary(); + void memleakfinder_reportleaks(); void memleakfinder_reportleaks_appendfile(const char *filename, const char *markertext); |