Patent ID: 7624137

Claim:
A method of performing a mark and sweep garbage collection process for a real-time application such that it has determinable space bounds, the method comprising: using a memory for: allocating memory space for the application, wherein allocated memory is defined to include directly allocated memory and indirectly allocated memory due to mutation; segmenting the memory space into a number of pages of a predetermined size; and dividing the pages into blocks of a predetermined size; using a mutator for performing an iterative mutation process by: assuring that only non-null, unmarked objects are placed into a write buffer; identifying objects to be allocated; allocating the objects into the pages and blocks; marking objects no longer used as dead objects; and sorting the pages of memory according to a number of dead objects per page; wherein each iterative mutation process consumes memory a size of one object pointer; using a trace-based hybrid collector for: removing the dead objects; and defragmenting the memory space using defragmentation with limited copying of objects; using a processor for selecting an interval for an interleaving based upon a processing rate of the hybrid garbage collector; wherein the garbage collection process is bounded by a time for collection and an overhead memory space requirement; and using a timer for interleaving the garbage collection and the real-time application on a time-based schedule.