diff options
Diffstat (limited to 'memory.h')
-rw-r--r-- | memory.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -8,5 +8,8 @@ ((type*)check_after_allocation("calloc",num,sizeof(type),calloc((num),sizeof(type)))) #define realloc(ptr,num,type) \ ((type*)check_after_allocation("realloc",num,sizeof(type),realloc((ptr),(num)*sizeof(type)))) +#define strdup(str) \ + ((char*)check_after_allocation_str("strdup",strdup(str))) void* check_after_allocation(const char *func,size_t num,size_t sz,void *ptr); +void* check_after_allocation_str(const char *func,void *ptr); |