For extra sanity checking, fill free'd memory with garbage so we know that

people aren't reusing machine code buffers at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-05-12 00:03:12 +00:00
parent 9f3d1ba9ad
commit a5f0419b4e

View File

@ -321,6 +321,9 @@ namespace {
MemoryRangeHeader *MemRange = I->second;
assert(MemRange->ThisAllocated && "Block isn't allocated!");
// Fill the buffer with garbage!
DEBUG(memset(MemRange+1, 0xCD, MemRange->BlockSize-sizeof(*MemRange)));
// Free the memory.
FreeMemoryList = MemRange->FreeBlock(FreeMemoryList);