1
2
3
4
5
6
7
8
9
10
11
12
13
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
|