delorie.com/djgpp/doc/libc/libc_872.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <stdlib.h> void *xrealloc(void *ptr, size_t size); |
This function is just like realloc
(see section realloc), except that
if there is no more memory, it prints an error message and exits. It
can also properly handle ptr being NULL
.
Note that, currently, the header `stdlib.h' does not
declare a prototype for xrealloc
, because many programs declare
its prototype in different and conflicting ways. If you use
xrealloc
in your own code, you might need to provide your own
prototype explicitly.
A pointer to a possibly new block.
ANSI/ISO C | No |
POSIX | No |
char *buf; buf = (char *)xrealloc(buf, new_size); |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |