Patent ID: 7702663

Claim:
A method of moving an object in a garbage collection process in connection with an application, the method comprising: using a memory for: defining allocated memory to include both directly allocated memory and indirectly allocated memory; and maintaining a separate immortal heap in the memory for objects that cannot be moved; using a processor for implementing a time-based scheduling of the garbage collection process that interleaves functions of a collector and the application on a fixed schedule, wherein variations in mutator utilization are minimized by allocating certain functions to be performed by the collector and certain functions to be performed by the application, wherein the application places only non-null unmarked objects into a write buffer such that an overhead of the write buffer is kept constant; using the collector for: for the objects that can be moved, implementing an eager Brooks-style read barrier comprising a forwarding pointer positioned in a header of the object to move objects as part of the garbage collection process, wherein the forwarding pointer points to the object unless the object has been moved in which case the forwarding pointer points at the location to which the object has been moved; and locating and moving all objects during a collection phase; periodically processing a write buffer to mark the objects and place them in a work queue for scanning; and using an optimizing compiler for: optimizing the read barrier by breaking the read barrier and applying read barrier sinking to sink the read barrier to its point of use such that said read barrier unconditionally forwards all pointers; and, optimizing the application in the optimizing compiler by combining a null-check for the read barrier with a null-check from the application.