aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-05-30 15:47:37 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-05-30 14:01:13 +0000
commit81c1510f8e757bad9dd1eb3dd6226f0b36332559 (patch)
treea107ddbb6a8b53f8b929440e37524039b610ca0c /src/qml/memory
parent5e221d15170be49086f0ab8671e1b2b7831dd252 (diff)
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/memory')
-rw-r--r--src/qml/memory/qv4mm.cpp7
1 files changed, 4 insertions, 3 deletions
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