]> mj.ucw.cz Git - libucw.git/blob - lib/alloc.c
Initial revision
[libucw.git] / lib / alloc.c
1 /*
2  *      Sherlock Library -- Memory Allocation
3  *
4  *      (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
5  */
6
7 #include <stdio.h>
8 #include <stdlib.h>
9
10 #include "lib.h"
11
12 void *
13 xmalloc(uns size)
14 {
15   void *x = malloc(size);
16   if (!x)
17         die("Cannot allocate %d bytes of memory", size);
18   return x;
19 }