aboutsummaryrefslogtreecommitdiffstats
path: root/mem.c
blob: ff76b084c4840bda1fa1d8eb4126c986f26b6004 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
}