

realloc()                General Function               realloc()




Reallocate dynamic memory

cchhaarr *rreeaalllloocc(_p_t_r, _s_i_z_e) cchhaarr *_p_t_r; uunnssiiggnneedd _s_i_z_e;

realloc helps  you manage a program's arena.   It returns a block
of _s_i_z_e bytes that holds the contents of the old block, up to the
smaller of  the old and  new sizes.  realloc tries  to return the
same block,  truncated or extended;  if _s_i_z_e is  smaller than the
size of the old block, rreeaalllloocc will return the same _p_t_r.

***** Example *****

For an example of this function, see the entry for ccaalllloocc.

***** See Also *****

arena,  calloc(), free(),  general functions,  malloc(), memok(),
setbuf()

***** Diagnostics *****

rreeaalllloocc  returns NULL  if insufficient  memory is  available.  It
prints a  message and calls aabboorrtt if it  discovers that the arena
has been  corrupted, which most often occurs  by storing past the
bounds of an  allocated block.  rreeaalllloocc will behave unpredictably
if handed an incorrect _p_t_r.






























COHERENT Lexicon                                           Page 1


