diff options
author | Krow Savcik <krow@savcik.xyz> | 2023-09-26 22:32:35 +0300 |
---|---|---|
committer | Krow Savcik <krow@savcik.xyz> | 2023-09-26 22:32:35 +0300 |
commit | 9e660e594f6d3a43ea1427fb872801a2fcedad93 (patch) | |
tree | 459cd0c6fc5fef0366f7ef249ae19dd67c363772 /src/debug.h |
initial commit
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 |