18#define malloc(bytes) malloc_dbg(bytes, __LINE__, __FILE__, __FUNCTION__)
22#define calloc(elemCount, elemSize) calloc_dbg(elemCount, elemSize, __LINE__, __FILE__, __FUNCTION__)
26#define free(ptr) free_dbg(ptr)
28void*
malloc_dbg(
size_t bytes,
int line,
const char* filename,
const char* functionName);
30void*
calloc_dbg(
size_t elementCount,
size_t elementSize,
int line,
const char* filename,
const char* functionName);
void * malloc_dbg(size_t bytes, int line, const char *filename, const char *functionName)
malloc_dbg function is a wrapper around the malloc function.
Definition: malloc_dbg.c:129
void free_dbg(void *ptrToFree)
free_dbg function is used to free the memory allocated to a pointer.
Definition: malloc_dbg.c:208
void * calloc_dbg(size_t elementCount, size_t elementSize, int line, const char *filename, const char *functionName)
calloc_dbg function is a wrapper around the calloc function.
Definition: malloc_dbg.c:174
void printLeaks(void)
printLeaks function is used to print all the memory leaks.
Definition: malloc_dbg.c:264