The generic fix function

author Richard Brooksby
date 1995-08-25
index terms pair: fix function; design
revision //
status incomplete design
tag design.mps.fix


.intro: Fix is the interface through which the existence of references are communicated from the MPS client to the MPS. The interface also allows the value of such references to be changed (this is necessary in order to implement a moving memory manager).

Was-marked protocol

.was-marked: The ScanState has a Bool wasMarked field. This is used for finalization.

.was-marked.not: If a segment's fix method discovers that the object referred to by the ref (the one that it is supposed to be fixing) has not previously been marked (that is, this is the first reference to this object that has been fixed), and that the object was white (that is, in condemned space), it should (but need not) set the wasMarked field to FALSE in the passed ScanState.

.was-marked.otherwise: Otherwise, the fix method must leave the wasMarked field unchanged.

.was-marked.finalizable: The MRG pool (design.mps.poolmrg) uses the value of the wasMarked field to determine whether an object is finalizable.


.fix.nailed: In a copying collection, a non-ambiguous fix to a broken heart should be snapped out even if there is a RankAMBIG ref to same object (that is, if the broken heart is nailed); the RankAMBIG reference must either be stale (no longer in existence) or bogus.

Document History

  • 1995-08-25 RB Incomplete design.
  • 2002-06-07 RB Converted from MMInfo database design document.
  • 2013-04-14 GDR Converted to reStructuredText.
  • 2018-06-18 GDR Simplify the wasMarked protocol.