From 81c1510f8e757bad9dd1eb3dd6226f0b36332559 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 30 May 2018 15:47:37 +0200 Subject: Memory manager: Track icAllocator as part of used and allocated memory This makes it consistent with the memory profiler. Change-Id: I628d03a4c0d079af0940f0e424b779d992b2919d Reviewed-by: Simon Hausmann --- src/qml/memory/qv4mm.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/qml/memory/qv4mm.cpp') diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp index e98bd28a46..d9772e608e 100644 --- a/src/qml/memory/qv4mm.cpp +++ b/src/qml/memory/qv4mm.cpp @@ -1150,7 +1150,8 @@ void MemoryManager::runGC() if (aggressiveGC) { // ensure we don't 'loose' any memory - Q_ASSERT(blockAllocator.allocatedMem() == getUsedMem() + dumpBins(&blockAllocator, false)); + Q_ASSERT(blockAllocator.allocatedMem() + == blockAllocator.usedMem() + dumpBins(&blockAllocator, false)); } usedSlotsAfterLastFullSweep = blockAllocator.usedSlotsAfterLastSweep; @@ -1163,12 +1164,12 @@ void MemoryManager::runGC() size_t MemoryManager::getUsedMem() const { - return blockAllocator.usedMem(); + return blockAllocator.usedMem() + icAllocator.usedMem(); } size_t MemoryManager::getAllocatedMem() const { - return blockAllocator.allocatedMem() + hugeItemAllocator.usedMem(); + return blockAllocator.allocatedMem() + icAllocator.allocatedMem() + hugeItemAllocator.usedMem(); } size_t MemoryManager::getLargeItemsMem() const -- cgit v1.2.3