[FREELDR]

Add a hack to zero out heap allocations in the hope it fixes strange behavour

svn path=/trunk/; revision=55599
This commit is contained in:
Timo Kreuzer 2012-02-14 22:08:34 +00:00
parent 32d2f0f41c
commit 8c702c171c

View file

@ -375,6 +375,9 @@ HeapAllocate(
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;