MPS issue job004072

TitleMRG segments needlessly set the write barrier
Statusclosed
Priorityoptional
Assigned userGareth Rees
OrganizationRavenbrook
DescriptionMRG segments are never handed out to the mutator and so should never need to set the write barrier. But MRGSeg inherits from GCSeg, which sets the write barrier (see gcSegSyncWriteBarrier). This results in needless memory protection operations and failed assertions in finalization tests with deep checking (see job004030).
AnalysisSince MRG segments are never given to the mutator, the MPS doesn't need to use the write barrier to maintain the per-segment summary: instead, it could maintain the summary "by hand" using ArenaPoke.

The segment class hierarchy should be finer grained: the GCSeg class should not implement the write barrier, and then pools can use a MutatorGCSeg subclass that implements the write barrier.
How foundinspection
EvidenceNone
Created byGareth Rees
Created on2018-06-18 11:04:56
Last modified byGareth Rees
Last modified on2018-07-05 16:29:04
History2018-06-18 GDR Created.

Fixes

Change Effect Date User Description
194453 closed 2018-07-05 16:28:15 Gareth Rees Merge branch/2018-06-18/mrgseg into the master sources.