silc_srealloc

SYNOPSIS

    void *silc_srealloc(SilcStack stack, SilcUInt32 old_size,
                        void *ptr, SilcUInt32 size);

DESCRIPTION

Change the size of the memory block indicated by `ptr' to the new size of `size' bytes. The contents of `ptr' will not be changed. If `ptr' is NULL the call is equivalent to silc_smalloc. If `size' is zero (0) error will occur. Returns NULL on error and the old pointer remain intact. This may return different pointer from `ptr'

NOTES

If the reallocation from `stack' fails, this function will allocate new block of size of `size' bytes from `stack' and copy the data from `ptr' to the new memory block.

If `stack' is NULL this function calls silc_realloc.