diff options
Diffstat (limited to 'mem.c')
| -rw-r--r-- | mem.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +#include "mem.h" + +#include <curses.h> +#include <stddef.h> +#include <stdlib.h> + +#include "err.h" + +void *xmalloc(size_t size) { + void *rtn = malloc(size); + if (!rtn) { + endwin(); + die("Out of memory"); + } + return rtn; +} |
