summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2022-01-06 22:29:03 +0000
committerPeter Zhu <peter@peterzhu.ca>2022-04-01 08:45:52 -0400
commit76572e5a7fc0ffde6501fd9a8c034bb621f11688 (patch)
tree8d5d25d8f60b9e64d8069afeeab7b732eab9aed7 /spec
parent7dfea79ebf4e60b9295e4a884c68c387b8c76bdf (diff)
[Feature #18619] Reverse the order of compaction movement
This commit changes the way compaction moves objects and sweeps pages in order to better facilitate object movement between size pools. Previously we would move the scan cursor first until we found an empty slot and then we'd decrement the compact cursor until we found something to move into that slot. We would sweep the page that contained the scan cursor before trying to fill it In this algorithm we first move the compact cursor down until we find an object to move - We then take a free page from the desired destination heap (always the same heap in this current iteration of the code). If there is no free page we sweep the page at the sweeping_page cursor, add it to the free pages, and advance the cursor to the next page, and try again. We sweep one page from each size pool in this way, and then repeat that process until all the size pools are compacted (all the cursors have met), and then we update references and sweep the rest of the heap.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5637
Diffstat (limited to 'spec')
0 files changed, 0 insertions, 0 deletions