aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-09-11 21:54:56 +0200
committerLars Knoll <lars.knoll@qt.io>2018-09-14 19:21:00 +0000
commit92ae20a2140b922ee272edb21ba2a3e87ead5c06 (patch)
tree1751fcdcdd5625bad8dab1134f02a8c4254c9357 /src/qml/memory
parentf44eb67f7dd922642a69834e18536c20e8218ba3 (diff)
Don't let GC runs be dominated by internal classes
Change-Id: Icdd0f303f06605e8fdf2f1b324274ad95bfdebf3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/memory')
-rw-r--r--src/qml/memory/qv4mm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index b9e6327ea2..acaaa3b920 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -1045,7 +1045,7 @@ void MemoryManager::sweep(bool lastSweep, ClassDestroyStatsCallback classCountPt
bool MemoryManager::shouldRunGC() const
{
- size_t total = blockAllocator.totalSlots();
+ size_t total = blockAllocator.totalSlots() + icAllocator.totalSlots();
if (total > MinSlotsGCLimit && usedSlotsAfterLastFullSweep * GCOverallocation < total * 100)
return true;
return false;
@@ -1181,7 +1181,7 @@ void MemoryManager::runGC()
== blockAllocator.usedMem() + dumpBins(&blockAllocator, false));
}
- usedSlotsAfterLastFullSweep = blockAllocator.usedSlotsAfterLastSweep;
+ usedSlotsAfterLastFullSweep = blockAllocator.usedSlotsAfterLastSweep + icAllocator.usedSlotsAfterLastSweep;
// reset all black bits
blockAllocator.resetBlackBits();