From 73635bb1b32450a86c78866ed8c485cc1ce3a1de Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 8 Dec 2008 09:19:13 +0100 Subject: some memory handling fixes --- worker/util.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'worker/util.h') 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 +#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__); \ -- cgit