firestring_malloc3
Malloc(3) with internal result checking
Usage
#include <firestring.h>
-lfirestring
void *firestring_malloc(const size_t size)
Overview
firestring_malloc() acts exactly like malloc(3) except that it detects malloc failures, prints an error and exit(3) with exit status EXIT_FAILURE. In most programs, malloc failures are unrecoverable, and this is the preferred behaviour.
Return value
If firestring_malloc() returns, it always returns a new memory area of size bytes. It never returns NULL.
Releases
Unchanged in 6 releases since Debian 3.1 (Sarge).