mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
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:
parent
9f3d1ba9ad
commit
a5f0419b4e
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user