An incremental collector can include memory pages, preferably virtual
memory (VM) pages containing objects. A bit or byte map is created with
one entry corresponding to each VM page. The VM page being collected is
first write-protected and then the reachable objects are copied or
relocated. Application induced changes to objects that have already been
relocated are flagged in the map. Later the collector will suspend the
application, scan the map and update the relocated objects that were
changed and update the references to these objects. In one embodiment
aimed at concurrent collecting, the map is copied to a second map, and
the second map is scanned for changes that are propagated as before. The
application may be suspended on the last pass through the map for the
updating of remaining relocated objects by scanning the first map. The
incremental collector can be a Train algorithm.