1 /* src/common/try_malloc.c */
3 #include "try_malloc.h"
4 #include <stdlib.h> /* for malloc */
5 #include <sys/types.h> /* for size_t */
6 #include "rexit.h" /* for exit_trouble() */
10 extern void * try_malloc(size_t size, char * f)
12 void * p = malloc(size);
13 exit_trouble(NULL == p, f, "malloc()");