News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

HeapReAlloc failure

Started by jdoe, December 18, 2008, 02:15:28 PM

Previous topic - Next topic

jdoe


Hi,

I can't find the answer for that "simple" question...

What happen to the original memory block if I call HeapReAlloc and it fails. Does the original block stay unchanged and still exist ?


MichaelW

Per the PSDK:
QuoteIf HeapReAlloc fails, the original memory is not freed, and the original handle and pointer are still valid.

I would guess that the memory contents would be preserved. I doubt that the function would go about changing the memory before determining if reallocation was possible.

eschew obfuscation

jdoe


Shame on me. I sticked to the Return value section and forgot the Remarks. I searched the web when the answer was just few lines below where I was first.

Sorry   :red