T_realloc

T_realloc

POINTER T_realloc (

 

POINTER

block,

/* block address */

unsigned int len

/* new length */

);

 

 

 

 

 

Description

T_realloc changes the size of block to len. It allocates a memory block of length len bytes, copies as many bytes as possible from the old memory block to the new one, and frees the old block. The address of the new block can be different from the address of the old block. The value of len can be zero, in which case T_realloc returns

avalid non-NULL_PTRvalue. On error, block is freed. Note that many implementations of realloc do not free the block on error, so T_realloc must to do this. The value of block is allocated with T_malloc or reallocated with T_realloc, or it is NULL_PTR. If

block is NULL_PTR, T_realloc performs as T_malloc.

Return value

ValueDescription

address of new block Operation was successful.

NULL_PTR error

3 4 6

R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l

Page 356
Image 356
RSA Security 5 manual Pointer Trealloc