]>
Commit | Line | Data |
---|---|---|
18c8241a MM |
1 | /* |
2 | * BIRD Library -- malloc() With Checking | |
3 | * | |
4 | * (c) 1998 Martin Mares <mj@ucw.cz> | |
5 | * | |
6 | * Can be freely distributed and used under the terms of the GNU GPL. | |
7 | */ | |
8 | ||
9 | #include <stdlib.h> | |
10 | ||
11 | #include "nest/bird.h" | |
12 | #include "lib/resource.h" | |
13 | ||
14 | void * | |
15 | xmalloc(unsigned size) | |
16 | { | |
17 | void *p = malloc(size); | |
18 | if (p) | |
19 | return p; | |
20 | die("Unable to allocate %d bytes of memory", size); | |
21 | } |