Patent ID: 8028008

Claim:
A method for optimizing a write barrier for a garbage collection, the method comprising: allocating an object that is referred by a data value of a slot; storing a dirtiness indicator of the slot in a bitmap and an address of the slot in a log; and subsequent to said storing, rescanning the log to discover an update to the stored address of the slot, said rescanning comprising: fetching a stored address of the slot from the log; subsequent to said fetching, determining that the fetched address of the slot is not within an active object range, wherein objects in said active object range is frequently modified; subsequent to said determining, confirming that another object that is referred to by a reference stored in the slot is not marked indicating that said another object has not been reached from a root or another reference in another object; subsequent to said confirming, unsetting the dirtiness indicator for the slot in the bitmap; and subsequent to said unsetting, marking said another object as live and pushing all of its object references to a mark stack, wherein the mark stack is a data structure used by a garbage collector for tracing all object reference chains from a respective root of each object reference, wherein a mutator performs said storing and said rescanning, wherein the mutator is a thread of execution in a virtual machine that performs the garbage collection.