xalloc man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

xalloc(l)			BEGEMOT Library			     xalloc(l)

NAME
       xalloc, xrealloc - memory allocation with simple error check

SYNOPSIS
       # include <begemot.h>

       void * xalloc(size_t size);

       void * xrealloc(void *ptr, size_t size);

       void xfree(void *ptr);

DESCRIPTION
       These  functions are a layer above the malloc(3C) and realloc(3C) func‐
       tions.  They call these basic functions and check whether the  returned
       pointer is NULL.	 In this case panic(l) is called with the message 'Out
       of memory:  param' , where param are the parameters to  the  allocation
       function.

       See malloc(3C) and realloc(3C) for a description of the arguments.

       These functions have the following additional features:

       -      xalloc(0) returns a unique pointer for each call.

       -      xfree(NULL) is legal.

       -      xrealloc(NULL, 0) behaves like xalloc(0).

       -      xrealloc(NULL, s) will behave like xalloc(s).

       -      xrealloc(p, 0) behaves like a sequence of free(p) and xalloc(0).

RETURN VALUE
       See  malloc(3C) and realloc(3C) for a description of the return values.
       Note that these functions never return NULL.

SEE ALSO
       malloc(3C), realloc(3C), panic(l)

BEGEMOT				  31 May 1996			     xalloc(l)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net