If realloc() method couldn't able to allocate new memory space, then what will happen to the previous memory block which was passed to realloc() method? Will it be usable or un usable?
It is rare case, in such case your memory will become unusable.
In that case, your previous memory block will not be disturbed, so you can use it as usual.
we can't predict its behavior.
it might crash.
If realloc couldn't able to allocate new memory space, still older memory block is valid and will be usable.
Back To Top