diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2006-03-04 18:16:49 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2006-03-04 18:16:49 +0000 |
commit | d6231bab89d634da5564491196b7c478db038505 (patch) | |
tree | bfc0bf00b138763eb41132fd27a8f389a78bf3a4 /debug.h |
Initial import.
Diffstat (limited to 'debug.h')
-rw-r--r-- | debug.h | 22 |
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 |