void *p = malloc (size);
if (!p)
MEM_ALLOC_FAIL_DEBUG (file, line);
+ vfprintf_diag ("malloc'ed %lu bytes [file %s, line %u]", (unsigned long)size, file, line);
return p;
}
void *p = calloc (nmemb, size);
if (!p)
MEM_ALLOC_FAIL_DEBUG (file, line);
+ vfprintf_diag ("calloc'ed %lu bytes [file %s, line %u]", (unsigned long)(nmemb * size), file, line);
return p;
}
void *p = realloc (ptr, size);
if (!p)
MEM_ALLOC_FAIL_DEBUG (file, line);
+ vfprintf_diag ("realloc'ed %lu bytes [file %s, line %u]", (unsigned long)size, file, line);
return p;
}
#endif /* !DEBUG */