Author: tkreuzer
Date: Tue Feb 14 22:08:34 2012
New Revision: 55599
URL:
http://svn.reactos.org/svn/reactos?rev=55599&view=rev
Log:
[FREELDR]
Add a hack to zero out heap allocations in the hope it fixes strange behavour
Modified:
trunk/reactos/boot/freeldr/freeldr/mm/heap_new.c
Modified: trunk/reactos/boot/freeldr/freeldr/mm/heap_new.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/he…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/mm/heap_new.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/mm/heap_new.c [iso-8859-1] Tue Feb 14 22:08:34
2012
@@ -375,6 +375,9 @@
TRACE("HeapAllocate(%p, %ld, %.4s) -> return %p\n",
HeapHandle, ByteSize, &Tag, Block->Data);
+ /* HACK: zero out the allocation */
+ RtlZeroMemory(Block->Data, Block->Size * sizeof(HEAP_BLOCK));
+
#ifdef FREELDR_HEAP_VERIFIER
/* Write size and redzones */
*REDZONE_SIZE(Block) = ByteSize - REDZONE_ALLOCATION;