What if MemReAlloc fails?

Jouni Miettunen (jouni.miettunen@ccc.fi)
Wed, 12 Feb 1997 14:37:37 +0200

Hello,

When MemReAlloc() returns NullHandle, is the old memory block freed?
Routines book says only:

If you request that the block be expanded, but this is
impossible, then the routine will return NullHandle.

If I have a 4k memory block and ask it to be resize into 5k and that
cannot be done, is the original 4k memory block freed? The question
is can I use same memory handle as a parameter to MemReAlloc and to
receive the MemReAlloc return value.

mhMemory = MemReAlloc (mhMemory, 5*1024, HAF_ZERO_INIT);

--jouni miettunen