mirror of
https://github.com/curl/curl.git
synced 2026-08-04 06:09:59 +03:00
added for memory leak debugging etc
This commit is contained in:
parent
1e2e6a4e33
commit
d49d05bce6
2 changed files with 111 additions and 0 deletions
13
lib/memdebug.h
Normal file
13
lib/memdebug.h
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue