Back to index

lightning-sunbird  0.9+nobinonly
xmalloc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


voidxmalloc (size_t size)
voidxcalloc (size_t nmemb, size_t size)

Function Documentation

void* xcalloc ( size_t  nmemb,
size_t  size 

Definition at line 46 of file xmalloc.c.

    void *buf;

    buf = calloc (nmemb, size);
    if (!buf) {
       fprintf (stderr, "Error: Out of memory. Exiting\n");
       exit (1);

    return buf;

Here is the call graph for this function:

Here is the caller graph for this function:

void* xmalloc ( size_t  size)

Definition at line 152 of file pathsub.c.

    void *p = malloc(size);
    if (!p)
       fail("cannot allocate %u bytes", size);
    return p;