REALLOC(3) BSD Programmer's Manual REALLOC(3) NNAAMMEE rreeaalllloocc - reallocation of memory function SSYYNNOOPPSSIISS ##iinncclluuddee <<ssttddlliibb..hh>> _v_o_i_d _* rreeaalllloocc(_v_o_i_d _*_p_t_r, _s_i_z_e___t _s_i_z_e); DDEESSCCRRIIPPTTIIOONN The rreeaalllloocc() function changes the size of the object pointed to by _p_t_r to the size specified by _s_i_z_e. The contents of the object are unchanged up to the lesser of the new and old sizes. If the new size is larger, the value of the newly allocated portion of the object is indeterminate. If _p_t_r is a null pointer, the rreeaalllloocc() function behaves like the mal- loc(3) function for the specified size. Otherwise, if _p_t_r does not match a pointer earlier returned by the calloc(3), malloc(3), or rreeaalllloocc() function, or if the space has been deallocated by a call to the free or rreeaalllloocc() function, unpredictable and usually detrimental behaviour will occur. If the space cannot be allocated, the object pointed to by _p_t_r is unchanged. If _s_i_z_e is zero and _p_t_r is not a null pointer, the object it points to is freed. The rreeaalllloocc() function returns either a null pointer or a pointer to the possibly moved allocated space. SSEEEE AALLSSOO alloca(3), calloc(3), free(3), malloc(3), SSTTAANNDDAARRDDSS The rreeaalllloocc() function conforms to ANSI C X3.159-1989 (``ANSI C ''). 4.4BSD June 4, 1993 1