diff options
Diffstat (limited to 'src/debug.h')
-rw-r--r-- | src/debug.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/debug.h b/src/debug.h new file mode 100644 index 0000000..20285c9 --- /dev/null +++ b/src/debug.h @@ -0,0 +1,14 @@ +void *f_debug_mem_malloc(size_t, const char *, unsigned int); +void *f_debug_mem_realloc(void *, size_t, const char *, unsigned int); +void f_debug_mem_free(void *, const char *, unsigned int); +void f_debug_mem_show(); + +#define F_MEMORY_DEBUG + +#ifdef F_MEMORY_DEBUG + +#define malloc(n) f_debug_mem_malloc(n, __FILE__, __LINE__) +#define realloc(n,s) f_debug_mem_realloc(n, s, __FILE__, __LINE__) +#define free(n) f_debug_mem_free(n, __FILE__, __LINE__) + +#endif |