Patent ID: 6393439
Filing Date: 2002-05-21
Classification: G06F,Y10S

Abstract:
A garbage collection and marking method for traversing data structures formed of data objects linked by identifying pointers in a contiguous heap memory, with garbage collection of objects classed as deletable, the method comprising the steps of:a) for a selected root object, traversing the pointers carried thereby to determine the objects linked to the root object; and b) traversing pointers to determine further objects linked to those identified by the previous step; wherein step b) is repeated until no further pointers remain to be traversed, in such a fashion that, I. the objects identified therein are classed as marked, II. some of the heap data objects carry finalisers, III. some further objects are identified as potentially reachable by those finalizers, which objects are classed as pending, IV. a first count is maintained of heap objects carrying finalizers and, V. for each traversal, A) if the detected total of objects carrying finalizers is less than the maintained first count, a further sweep is undertaken to identify and mark root objects for the remaining finalizer-reachable objects, while B) if the detected and maintained totals match, those objects classed as pending are immediately reclassed as deletable with no further sweep undertaken.