#include "mem.h" #include #include void *M(void *p, size_t sz) { if (sz == 0) { free(p); return NULL; } else { void *x = realloc(p, sz); if (x == NULL) { printf("out of memory! aaaaaaa!!!!!\n"); exit(42); } return x; } }