mirror of
https://github.com/curl/curl.git
synced 2026-05-17 08:46:21 +03:00
Gisle Vanem's added support calloc()-debugging and outputting mode for
fopen() as well.
This commit is contained in:
parent
7d8cd5906c
commit
07de0ff0ff
2 changed files with 30 additions and 2 deletions
|
|
@ -49,6 +49,7 @@ extern FILE *logfile;
|
|||
|
||||
/* memory functions */
|
||||
void *curl_domalloc(size_t size, int line, const char *source);
|
||||
void *curl_docalloc(size_t elements, size_t size, int line, const char *source);
|
||||
void *curl_dorealloc(void *ptr, size_t size, int line, const char *source);
|
||||
void curl_dofree(void *ptr, int line, const char *source);
|
||||
char *curl_dostrdup(const char *str, int line, const char *source);
|
||||
|
|
@ -72,6 +73,7 @@ int curl_fclose(FILE *file, int line, const char *source);
|
|||
#undef strdup
|
||||
#define strdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__)
|
||||
#define malloc(size) curl_domalloc(size, __LINE__, __FILE__)
|
||||
#define calloc(nbelem,size) curl_docalloc(nbelem, size, __LINE__, __FILE__)
|
||||
#define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__)
|
||||
#define free(ptr) curl_dofree(ptr, __LINE__, __FILE__)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue