#ifdef DBG_HEAP extern int DbgHeapDump(void); extern void *DbgMalloc(size_t size, char * pszFile, int usLine); extern void *DbgRealloc(void *ptr, size_t size, char *pszFile, int usLine); extern void *DbgStrdup(char *psz, char *pszFile, int usLine); extern void DbgFree(void *ptr, char *pszFile, int usLine); #ifndef DBG_HEAP_ME_MYSELF_I #define malloc(s) DbgMalloc(s, __FILE__, __LINE__) #define realloc(p,s) DbgRealloc(p, s, __FILE__, __LINE__) #define strdup(p) DbgStrdup(p, __FILE__, __LINE__) #define free(p) DbgFree(p, __FILE__, __LINE__) #endif #endif