K/N custom-alloc: Fix GC stats for NextFitPage ^KT-55364

Swept and kept objects in NextFitPages are double counted; first in
GCApi::SweepObject and then again inside NextFitPage::Sweep. This fix
removes the latter.


Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-691
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
This commit is contained in:
Troels Bjerre Lund
2023-05-12 09:24:16 +00:00
committed by Space Cloud
parent 36d6e6dd06
commit bc7b1094c3
@@ -47,10 +47,8 @@ bool NextFitPage::Sweep(GCSweepScope& sweepHandle, FinalizerQueue& finalizerQueu
if (block->isAllocated_) {
if (SweepObject(block->data_, finalizerQueue, sweepHandle)) {
alive = true;
sweepHandle.addKeptObject();
} else {
block->Deallocate();
sweepHandle.addSweptObject();
}
}
}