From fa69a45b386b3091347ee73cb5d8310ed5fd3ed2 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Tue, 23 Apr 2024 17:55:21 +0200 Subject: [PATCH] gc: Fix wasDrainNecessary condition We want to drain when we potentially don't have enough space, not when there's plenty of space. Change-Id: I939b3c69764b8b466fa045d0c9ba212722de1329 Reviewed-by: Ulf Hermann --- src/qml/memory/qv4mm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp index 61dd59de23..f1910a4a56 100644 --- a/src/qml/memory/qv4mm.cpp +++ b/src/qml/memory/qv4mm.cpp @@ -707,7 +707,7 @@ static constexpr int markLoopIterationCount = 1024; bool wasDrainNecessary(MarkStack *ms, QDeadlineTimer deadline) { - if (ms->remainingBeforeSoftLimit() < markLoopIterationCount) + if (ms->remainingBeforeSoftLimit() > markLoopIterationCount) return false; // drain ms->drain(deadline);