One embodiment of the present invention provides a system that facilitates performing
generational garbage collection on a heap. The system operates by dividing an old
generation of the heap into segments. Next, the system divides each segment into
a series of cards and associates a separate card table with each segment. This
card table has an entry for each card in the segment. In a variation on this embodiment,
while updating a pointer within an object in the old generation, the system locates
the segment containing the object and accesses the card table for the segment.
The system then marks the entry in the card table associated with the card containing
the object.