- exit(1);
-}
-
-static void
-bad_malloc(unsigned int size)
-{
- fprintf(stderr, "fatal: could not malloc() %d bytes\n",
- (int) size);
- exit(1);
-}
-
-void *
-emallocz(unsigned int size)
-{
- void *res = calloc(1, size);
- if(!res)
- bad_malloc(size);
- return res;