summaryrefslogtreecommitdiffstats
path: root/debug.h
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2006-03-04 18:16:49 +0000
committerHisham Muhammad <hisham@gobolinux.org>2006-03-04 18:16:49 +0000
commitd6231bab89d634da5564491196b7c478db038505 (patch)
treebfc0bf00b138763eb41132fd27a8f389a78bf3a4 /debug.h
Initial import.
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/debug.h b/debug.h
new file mode 100644
index 00000000..8ef971d6
--- /dev/null
+++ b/debug.h
@@ -0,0 +1,22 @@
+
+#ifdef DEBUG
+
+#include "DebugMemory.h"
+
+#define calloc(a, b) DebugMemory_calloc(a, b, __FILE__, __LINE__);
+#define malloc(x) DebugMemory_malloc(x, __FILE__, __LINE__);
+#define realloc(x,s) DebugMemory_realloc(x, s, __FILE__, __LINE__);
+#define strdup(x) DebugMemory_strdup(x, __FILE__, __LINE__);
+#define free(x) DebugMemory_free(x, __FILE__, __LINE__);
+
+#define debug_done() DebugMemory_report();
+
+#endif
+
+#ifndef DEBUG
+
+#define NDEBUG
+
+#define debug_done() sleep(0)
+
+#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy