Commit f2f7d31f authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:3825] #3825 Print memory usage (from malloc_stats()) on failed assert.

git-svn-id: file:///svn/toku/tokudb@33952 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9707bdb7
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h>
#if !TOKU_WINDOWS #if !TOKU_WINDOWS
#include <execinfo.h> #include <execinfo.h>
#endif #endif
...@@ -53,6 +54,9 @@ toku_do_backtrace_abort(void) { ...@@ -53,6 +54,9 @@ toku_do_backtrace_abort(void) {
} }
else else
fprintf(stderr, "Engine status function not available\n"); fprintf(stderr, "Engine status function not available\n");
fprintf(stderr, "Memory usage:\n");
fflush(stderr); // just in case malloc_stats() crashes, we still want engine status (and to know that malloc_stats() failed)
malloc_stats();
fflush(stderr); fflush(stderr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment