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