blob: 30704f31804754a65c706f12ea1b395723c2c5da [file] [log] [blame]
/*
* xmalloc.c
*
* Simple error-checking version of malloc()
*
*/
#include "config.h"
void *xmalloc(size_t size)
{
void *p = malloc(size);
if (!p) {
fprintf(stderr, "Out of memory!\n");
exit(128);
}
return p;
}