diff options
Diffstat (limited to 'worker/util.h')
-rw-r--r-- | worker/util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/worker/util.h b/worker/util.h index 77126b4..5bf0541 100644 --- a/worker/util.h +++ b/worker/util.h @@ -4,6 +4,13 @@ extern int debug_level; void debug_fn(const char *format, ...); +#include <malloc.h> +#define MEMINFO do{ \ + struct mallinfo minfo; \ + minfo=mallinfo(); \ + DEBUG(5, ("---allocated space: %d-----\n",minfo.uordblks)); \ +}while(0) + #define DEBUG(level, body) do { \ if (level <= debug_level) { \ debug_fn("DEBUG-%d (%s,%d): %s: ", level, __FILE__, __LINE__ , __FUNCTION__); \ |