In a garbage collector that employs the train algorithm, remembered sets are
employed
to record the locations of references to objects in a train car in objects outside
the car. During each collection, remembered set entries are processed to find the
locations of references into the cars yet to be collected. The found locations
are stored in scratch-pad lists, and each entry in that list includes a mode indicator
that specifies whether the entry represents a single reference location or the
locations of more than one reference. One possible value of the mode indicator
indicates that the entry consists of two computer words rather than one, the second
computer word containing a list of offsets into a region specified by the first
word. Another possible mode-indicator value indicates that a region contains references,
but it does not specify where within the region those references occur.