diff options
Diffstat (limited to 'lib/Core/MemoryManager.cpp')
-rw-r--r-- | lib/Core/MemoryManager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Core/MemoryManager.cpp b/lib/Core/MemoryManager.cpp index cec7b7d1..72c1b67f 100644 --- a/lib/Core/MemoryManager.cpp +++ b/lib/Core/MemoryManager.cpp @@ -50,12 +50,14 @@ MemoryObject *MemoryManager::allocate(uint64_t size, bool isLocal, bool isGlobal MemoryObject *MemoryManager::allocateFixed(uint64_t address, uint64_t size, const llvm::Value *allocSite) { +#ifndef NDEBUG for (objects_ty::iterator it = objects.begin(), ie = objects.end(); it != ie; ++it) { MemoryObject *mo = *it; assert(!(address+size > mo->address && address < mo->address+mo->size) && "allocated an overlapping object"); } +#endif ++stats::allocations; MemoryObject *res = new MemoryObject(address, size, false, true, true, |