neon API reference NEMALOC(3)
NAME
nemalloc, necalloc, nerealloc, nestrdup, nestrndup,
neoomcallback - memory allocation wrappers
SYNOPSIS
#include
void *nemalloc (sizet size);
void *necalloc (sizet size);
void *nerealloc (void *size, sizet len);
char *nestrdup (const char *s, sizet size);
char *nestrndup (const char *s, sizet size);
void neoomcallback (void (*callback)(void));
DESCRIPTION
The functions nemalloc, necalloc, nerealloc, nestrdup
and nestrdnup provide wrappers for the equivalent functions
in the standard C library. The wrappers provide the extra
guarantee that if the C library equivalent returns NUL when
no memory is available, an optional callback will be called,
and the library will then call abort().
neoomcallback registers a callback which will be invoked
if an out of memory error is detected.
NOTES
If the operating system uses optimistic memory allocation,
the C library memory allocation routines will not return
NUL, so it is not possible to gracefully handle memory al-
location failures.
AUTHOR
Joe Orton .
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
box; cbp-1 cbp-1 l l . ATRIBUTE TYPE ATRIBUTE VALUE =
Availability SUNWneon = Interface Stability Volatile
neon 0.25.5 Last change: 20 January 2006 1
neon API reference NEMALOC(3)
NOTES
Source for Neon is available on http:/opensolaris.org.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWneon
Interface Stability Volatile
NOTES
Source for Neon is available on http:/opensolaris.org.
neon 0.25.5 Last change: 20 January 2006 2
|