Open Bug 1192244 Opened 10 years ago Updated 2 years ago

Investigate making compacting GC more incremental

Categories

(Core :: JavaScript: GC, defect)

defect

Tracking

()

People

(Reporter: jonco, Unassigned)

References

(Blocks 2 open bugs)

Details

Currently compacting GC runs incremental but compacts a whole zone at a time. The mutator must not be allowed to observe pointers to the old location of relocated cells, but the updating of those pointers is the longest part of compacting. One approach for incrementalising this further would be to protect memory pages containing pointers that have not been updated and install a fault handler that updates those pages on demand. Then we could return to the mutator at any time after the relocation has happened.
Blocks: CompactingGC
It seems we need to protect memory pages containing object slots and elements as well for this to work. This would require writing a custom allocator for this memory, which was something we were considering doing anyway so we could implement card marking.
(In reply to Jon Coppeard (:jonco) from comment #1) I no longer think comment 1 is true. Slots and elements can only be reached by reading out of GC allocated memory. Nothing should hold pointers into slots or elements, so the original approach should still work.
Assignee: jcoppeard → nobody
Blocks: 1507440
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.