Skip to content

Commit

Permalink
Fix issue with multipass compaction.
Browse files Browse the repository at this point in the history
lastMobileObject should be the last mobile object observed during one pass of the compaction, and should be reinitialized on each pass
  • Loading branch information
guillep committed Mar 30, 2023
1 parent 64f7c6d commit 9b4c7cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions smalltalksrc/VMMaker/SpurPlanningCompactor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ SpurPlanningCompactor >> planCompactSavingForwarders [
toFinger := manager startOfObject: firstFreeObject.
top := savedFirstFieldsSpace start.
startOfPreviousPin := 0.
lastMobileObject := nil.
manager allOldSpaceEntitiesFrom: firstFreeObject do:
[:o|
self check: o.
Expand Down Expand Up @@ -509,6 +510,7 @@ SpurPlanningCompactor >> planCompactSavingForwarders [
[savedFirstFieldsSpace top: top - manager bytesPerOop.
objectAfterLastMobileObject := manager oldSpaceObjectAfter: lastMobileObject.
^false]]]].

"If the heap is already fully compacted there will be no lastMobileObject..."
lastMobileObject ifNotNil:
[savedFirstFieldsSpace top: top - manager bytesPerOop.
Expand Down

0 comments on commit 9b4c7cf

Please sign in to comment.