The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: baltoro on March 21, 2012, 07:40:10 PM

Title: I'll Bet You Didn't Know This
Post by: baltoro on March 21, 2012, 07:40:10 PM
Found this REALLY informative tidbit over at Raymons Chen's The Old New Thing (http://blogs.msdn.com/b/oldnewthing/).
As assembly programmers,... we are always using some kind of memory allocation function to access memory addresses,...in particular,...Heap­Alloc, Global­Alloc, Local­Alloc, and Co­Task­Mem­Alloc get alot of use in assembly code. This Raymond Chen blog entry explains why, when you invoke HeapReAlloc (http://msdn.microsoft.com/en-us/library/windows/desktop/aa366597(v=vs.85).aspx) on the same memory block with the HEAP_ZERO_MEMORY flag, the function sometimes does not work as you would expect.