Patent ID: 7584232
Filing Date: 2009-09-01
Classification: G06F,Y10S

Abstract:
1. A computer-implemented method of garbage collection of memory, said method comprising: (a) providing an execution of application program also known as mutator in the field of garbage collection; (b) providing an execution of tracing garbage collection also known as collector in the field of garbage collection; (c) providing a root set area, which contains memory outside managed heap, including execution stacks of application threads; (d) using reference counting technique during said execution of application program to maintain a correct value of lock-counter, which is an object-associated counter for each managed object, reflecting the number of references to the object from said root set area; (e) scanning managed objects in said execution of tracing garbage collection for root objects whose said lock-counter has a non-zero value, traversing said root objects and their descendants to determine reachable live objects and unreachable garbage; reclaiming said unreachable garbage; whereby the garbage collector avoids suspending application threads to scan their stacks for references in order to determine the beginning of traversal, and whereby reference moving is performed within said root set area without involving with the garbage collection, so reference counting and GC barrier actions for said reference moving within said root set area is removed even in a full concurrent garbage collection, and whereby an accurate, pause-less, deterministic, and efficient garbage collector is implemented for almost any platforms with a standard C++ compiler, even possible for a platform without either virtual memory support or user-mode/kernel-mode protection.