diff options
author | Martin Mares <mj@ucw.cz> | 1998-05-03 16:43:39 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-05-03 16:43:39 +0000 |
commit | 18c8241a91bd9208879666f1a1a13f454e66d75b (patch) | |
tree | 8bdc5f3e384b6b9198d5ab834d869c8d1fb261a7 /lib/xmalloc.c | |
parent | a8b6038225d18155883e330c96b2bc2e44153e1e (diff) |
BIRD library: The story continues.
Complete resource manages and IP address handling.
Diffstat (limited to 'lib/xmalloc.c')
-rw-r--r-- | lib/xmalloc.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/xmalloc.c b/lib/xmalloc.c new file mode 100644 index 00000000..c1ce7ea3 --- /dev/null +++ b/lib/xmalloc.c @@ -0,0 +1,21 @@ +/* + * BIRD Library -- malloc() With Checking + * + * (c) 1998 Martin Mares <mj@ucw.cz> + * + * Can be freely distributed and used under the terms of the GNU GPL. + */ + +#include <stdlib.h> + +#include "nest/bird.h" +#include "lib/resource.h" + +void * +xmalloc(unsigned size) +{ + void *p = malloc(size); + if (p) + return p; + die("Unable to allocate %d bytes of memory", size); +} |