Doxygen Source Code Documentation
fmalloc.c File Reference
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
Functions | |
void | fail_die_malloc_die (size_t size, const char *file, int line) |
void * | fail_die_malloc (size_t size, const char *file, int line) |
void * | fail_die_realloc (void *p, size_t size, const char *file, int line) |
Function Documentation
|
Definition at line 20 of file fmalloc.c. References fail_die_malloc_die(), file, malloc, and p. Referenced by fail_die_realloc().
|
|
Definition at line 12 of file fmalloc.c. References file. Referenced by fail_die_malloc(), and fail_die_realloc().
00013 { 00014 fprintf(stderr, "Out of memory! (wanted %lu at %s:%d)\n", 00015 (unsigned long)size, file, line); 00016 exit(1); 00017 } |
|
Definition at line 29 of file fmalloc.c. References fail_die_malloc(), fail_die_malloc_die(), file, p, and realloc.
00030 { 00031 if (!p) 00032 return fail_die_malloc(size, file, line); 00033 p = realloc(p, size); 00034 if (!p && size) 00035 fail_die_malloc_die(size, file, line); 00036 return p; 00037 } |