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 <ulf.hermann@qt.io>
This commit is contained in:
Fabian Kosmale 2024-04-23 17:55:21 +02:00
parent 4b4bca359b
commit fa69a45b38
1 changed files with 1 additions and 1 deletions

View File

@ -707,7 +707,7 @@ static constexpr int markLoopIterationCount = 1024;
bool wasDrainNecessary(MarkStack *ms, QDeadlineTimer deadline) bool wasDrainNecessary(MarkStack *ms, QDeadlineTimer deadline)
{ {
if (ms->remainingBeforeSoftLimit() < markLoopIterationCount) if (ms->remainingBeforeSoftLimit() > markLoopIterationCount)
return false; return false;
// drain // drain
ms->drain(deadline); ms->drain(deadline);