summaryrefslogtreecommitdiffstats
path: root/worker/util.h
diff options
context:
space:
mode:
authorSumit Bose <sbose@nb.localdomain>2008-12-08 09:19:13 +0100
committerSumit Bose <sbose@nb.localdomain>2008-12-08 09:19:13 +0100
commit73635bb1b32450a86c78866ed8c485cc1ce3a1de (patch)
tree8540c0825412e021c691e976f16b7e17c6a2e238 /worker/util.h
parent1be6a957fa90294f982f9e8531a05c86c49028fb (diff)
downloadipa_policy-73635bb1b32450a86c78866ed8c485cc1ce3a1de.tar.gz
ipa_policy-73635bb1b32450a86c78866ed8c485cc1ce3a1de.tar.xz
ipa_policy-73635bb1b32450a86c78866ed8c485cc1ce3a1de.zip
some memory handling fixes
Diffstat (limited to 'worker/util.h')
-rw-r--r--worker/util.h7
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__); \