From 18c8241a91bd9208879666f1a1a13f454e66d75b Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 3 May 1998 16:43:39 +0000 Subject: BIRD library: The story continues. Complete resource manages and IP address handling. --- lib/xmalloc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/xmalloc.c (limited to 'lib/xmalloc.c') diff --git a/lib/xmalloc.c b/lib/xmalloc.c new file mode 100644 index 0000000..c1ce7ea --- /dev/null +++ b/lib/xmalloc.c @@ -0,0 +1,21 @@ +/* + * BIRD Library -- malloc() With Checking + * + * (c) 1998 Martin Mares + * + * Can be freely distributed and used under the terms of the GNU GPL. + */ + +#include + +#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); +} -- cgit v1.2.3