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:
committed by
Space Cloud
parent
36d6e6dd06
commit
bc7b1094c3
@@ -47,10 +47,8 @@ bool NextFitPage::Sweep(GCSweepScope& sweepHandle, FinalizerQueue& finalizerQueu
|
|||||||
if (block->isAllocated_) {
|
if (block->isAllocated_) {
|
||||||
if (SweepObject(block->data_, finalizerQueue, sweepHandle)) {
|
if (SweepObject(block->data_, finalizerQueue, sweepHandle)) {
|
||||||
alive = true;
|
alive = true;
|
||||||
sweepHandle.addKeptObject();
|
|
||||||
} else {
|
} else {
|
||||||
block->Deallocate();
|
block->Deallocate();
|
||||||
sweepHandle.addSweptObject();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user