P
polas
Hi all - just a question Im wondering about. I realise that this
*might* be OS specific, however in general when I call a malloc then I
can allocate an arbitrary amount of memory. However, when I call
realloc on an already existing block of memory (to increase it's size)
then there is a limit to the size it will go.
Therefore I was wondering if the realloc will only increase the size
of an allocated memory block whilst the continous memory its
increasing into is free. Depending on this, could realloc ever
overwrite other, existing data?
Cheers,
Nick
*might* be OS specific, however in general when I call a malloc then I
can allocate an arbitrary amount of memory. However, when I call
realloc on an already existing block of memory (to increase it's size)
then there is a limit to the size it will go.
Therefore I was wondering if the realloc will only increase the size
of an allocated memory block whilst the continous memory its
increasing into is free. Depending on this, could realloc ever
overwrite other, existing data?
Cheers,
Nick