Patent ID: 7251671

Claim:
A method for garbage collection comprising: allocating a single space to accommodate a mark bit and an allocation bit, the mark bit and the allocation bit relating to garbage collection occurring at a virtual machine; integrating the mark bit and the allocation bit into a single mark/allocation bit at the single space to free other spaces for other system functions; corresponding the mark/allocation bit with an object in a heap, wherein the mark/allocation bit occupies the single space, the mark/allocation bit to perform dual functions of the mark bit and the allocation bit by alternating between the mark bit and the allocation bit via the single space; resetting the mark/allocation bit, and switching the mark/allocation bit to the allocation bit to perform root set enumeration, wherein the performing of the root set enumeration comprises lazy and selective root set enumeration, wherein the lazy and selective root set enumeration comprises lazily and selectively identifying the root object in a segment of the heap and regenerating the allocation bits for the root object and other objects associated with the root objects residing in the segment of the heap; resetting the mark/allocation bit, and switching the mark/allocation bit to the mark bit to perform marking and scanning of objects using the identified object; marking the identified object as a root object; scanning one or more objects associated with the root object by utilizing the mark/allocation bit as the mark bit; marking the scanned one or more objects associated with the root object; and providing mark/allocation bit information being displayed at the client.