|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
#include <stdlib.h> void *xmalloc(size_t size);
This function is just like
malloc (see section malloc), except that if
there is no more memory, it prints an error message and exits.
Note that, currently, the header `stdlib.h' does not
declare a prototype for
xmalloc, because many programs declare
its prototype in different and conflicting ways. If you use
xmalloc in your own code, you might need to provide your own
A pointer to the newly allocated memory.
char *f = xmalloc(100);
|webmaster||delorie software privacy|
|Copyright © 2004 by DJ Delorie||Updated Apr 2004|