diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-10-09 11:11:43 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-10-09 11:11:43 +0000 |
commit | d49d05bce603313d71f1a2b9904c74ca7b368703 (patch) | |
tree | 1b93a91135b055772d080291a506938538ff80eb /lib/memdebug.h | |
parent | 1e2e6a4e3310c05f68b85be6fa2344b9841bf016 (diff) |
added for memory leak debugging etc
Diffstat (limited to 'lib/memdebug.h')
-rw-r--r-- | lib/memdebug.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/memdebug.h b/lib/memdebug.h new file mode 100644 index 000000000..a0d670088 --- /dev/null +++ b/lib/memdebug.h @@ -0,0 +1,13 @@ +#ifdef MALLOCDEBUG +void *curl_domalloc(size_t size, int line, char *source); +void *curl_dorealloc(void *ptr, size_t size, int line, char *source); +void curl_dofree(void *ptr, int line, char *source); +char *curl_dostrdup(char *str, int line, char *source); +void curl_memdebug(char *logname); + +/* Set this symbol on the command-line, recompile all lib-sources */ +#define strdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__) +#define malloc(size) curl_domalloc(size, __LINE__, __FILE__) +#define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__) +#define free(ptr) curl_dofree(ptr, __LINE__, __FILE__) +#endif |