On 2005/05/31, Thomas Frieden wrote:
So I was wonder is its extend or just allocating a new block of memory?
Both.
If the original pointer is NULL, it is equivalent to a malloc. If it's not, it will re-allocate the block, and the contents will remain the same (up to min(oldsize, newsize)). If size is zero, it's equivalent to a free.
Note that it does not necessarily operate in-place. It might also allocate at a new address, and copy the contents.
Here's a link to the manpage: http://www.rt.com/man/realloc.3.html
okey thanks
Regards Rene W. Olsen