realloc
realloc
Defined in header <stdlib.h> | ||
---|---|---|
void *realloc( void *ptr, size_t new_size ); |
Reallocates the given area of memory. It must be previously allocated by malloc()
, calloc()
or realloc()
and not yet freed with a call to free
or realloc
. Otherwise, the results are undefined.
The reallocation is done by either:
a) expanding or contracting the exis