blob: 855e010e1e885c30cb3c87a42f69efb0ef2145a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#include "common/mem.h"
#include <stdlib.h>
#include "common/error.h"
void *malloc_or_die(size_t size) {
void *ptr = malloc(size);
if (ptr == NULL)
rage_quit(OUT_OF_MEMORY_ERROR);
return ptr;
}
|