From 9e660e594f6d3a43ea1427fb872801a2fcedad93 Mon Sep 17 00:00:00 2001 From: Krow Savcik Date: Tue, 26 Sep 2023 22:32:35 +0300 Subject: initial commit --- src/debug.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/debug.h (limited to 'src/debug.h') 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 -- cgit v1.2.3