Statistics
| Branch: | Revision:

iof-bird-daemon / lib / xmalloc.c @ 7a2105be

History | View | Annotate | Download (410 Bytes)

1
/*
2
 *        BIRD Library -- malloc() With Checking
3
 *
4
 *        (c) 1998--1999 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
#ifndef HAVE_LIBDMALLOC
15

    
16
void *
17
xmalloc(unsigned size)
18
{
19
  void *p = malloc(size);
20
  if (p)
21
    return p;
22
  die("Unable to allocate %d bytes of memory", size);
23
}
24

    
25
#endif