aboutsummaryrefslogtreecommitdiffstats
path: root/debug.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:15 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:15 +0200
commitd3c9975943df58e293359b87905d19ff1fd52061 (patch)
treee416378879f60e8d538b1b25963904f767d30ff4 /debug.h
downloaddebian_htop-d3c9975943df58e293359b87905d19ff1fd52061.tar.gz
debian_htop-d3c9975943df58e293359b87905d19ff1fd52061.tar.bz2
debian_htop-d3c9975943df58e293359b87905d19ff1fd52061.zip
Imported Upstream version 0.5upstream/0.5
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 0000000..8ef971d
--- /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