Patent ID: 8266190

Claim:
A method in a data processing system, of memory management in a real time runtime environment having a garbage collected memory heap, the runtime environment including a critical real time thread that is precluded from accessing the garbage collected memory heap, the runtime environment further including a scoped memory area for the allocation of objects therein for access by the critical real time thread, the method comprising: determining whether the critical real time thread currently accessing the scoped memory area is in a defined state so as to accommodate garbage collection of the scoped memory area; in response to a determination that the critical real time thread currently accessing the scoped memory area is in the defined state, initiating a process of garbage collection of the scoped memory area; identifying one or more software threads having references to objects allocated in the scoped memory area as root references; suspending the one or more software threads, in response to initiating the process of garbage collection of the scoped memory area, such that the execution of the one or more software threads is temporarily stopped; exiting the one or more software threads from a suspend state in response to identifying objects in the scoped memory area of the scoped memory system that are not marked; and compacting the scoped memory area by moving objects allocated in the scoped memory area to contiguous memory locations in the scoped memory area and updating references to moved objects to refer to the contiguous memory locations in the scoped memory area.