delorie.com/djgpp/doc/libc/libc_871.html | search |
[ < ] | [ > ] | [ << ] | [ 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
prototype explicitly.
A pointer to the newly allocated memory.
ANSI/ISO C | No |
POSIX | No |
char *f = xmalloc(100); |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |