39 int line,
const char *file)
41 log_fatal(
"Out of memory trying to %s " SIZE_T_PRINTF
" bytes at line %d of %s.",
42 called_as,
size, line, file);
51static void sanity_check_size(
size_t size,
const char *called_as,
52 int line,
const char *file)
61 log_verbose(
"Warning: %s with size " SIZE_T_PRINTF
" at line %d of %s",
62 called_as,
size, line, file);
74 const char *called_as,
int line,
const char *file)
79 sanity_check_size(
size, called_as, line, file);
102 const char *called_as,
int line,
const char *file)
111 sanity_check_size(
size, called_as, line, file);
114 new_ptr = realloc(ptr,
size);
133 const char *called_as,
int line,
const char *file)
135 size_t size = nelem * elsize;
139 memset(ptr, 0,
size);
149 const char *called_as,
int line,
const char *file)
#define log_verbose(message,...)
#define log_fatal(message,...)
void * fc_real_calloc(size_t nelem, size_t elsize, const char *called_as, int line, const char *file)
void * fc_real_malloc(size_t size, const char *called_as, int line, const char *file)
static void handle_alloc_failure(size_t size, const char *called_as, int line, const char *file)
void * fc_real_realloc(void *ptr, size_t size, const char *called_as, int line, const char *file)
char * real_fc_strdup(const char *str, const char *called_as, int line, const char *file)