9 #if defined(DBG_MEMLEAKS)
11 extern void* dbg_malloc (char *file
, int line
, char *func
, size_t bytes
);
12 extern void* dbg_calloc (char *file
, int line
, char *func
, size_t count
, size_t bytes
);
13 extern void* dbg_realloc (char *file
, int line
, char *func
, char *what
, void *mem
, size_t bytes
);
14 extern void dbg_free (char *file
, int line
, char *func
, char *what
, void *mem
);
16 #define MALLOC(bytes) dbg_malloc(__FILE__,__LINE__,__FUNCTION__,bytes)
17 #define CALLOC(count,bytes) dbg_calloc(__FILE__,__LINE__,__FUNCTION__,count,bytes)
18 #define FREE(mem) dbg_free(__FILE__,__LINE__,__FUNCTION__,#mem,mem)
19 #define REALLOC(mem,bytes) dbg_realloc(__FILE__,__LINE__,__FUNCTION__,#mem,mem,bytes)
25 #define REALLOC realloc