Patent ID: 7539822

Claim:
A method for facilitating faster execution of code and garbage collection on a memory-constrained computing device that has fast on-chip RAM, wherein the fast on-chip RAM is located on a processor chip, but is not cache memory, comprising: copying a compiled method from an object heap to a fast on-chip RAM on the memory-constrained computing device; and updating an execution pointer to point to the compiled method in the fast on-chip RAM, wherein the execution pointer otherwise points to a compiled method in the object heap or an interpreted method in the object heap, and wherein the execution pointer is updated by setting a virtual table entry; and performing a garbage-collection operation by: clearing the contents of the fast on-chip RAM, wherein clearing the contents of the fast on-chip RAM involves deleting all compiled methods from the fast on-chip RAM, but retaining the compiled methods in the object heap; examining the object heap for one or more execution pointers that point to compiled methods in the fast on-chip RAM that were deleted from the fast on-chip RAM during the clearing operation; and if one or more execution pointers are found, copying the compiled methods pointed to by the one or more execution pointers from the object heap to the fast on-chip RAM, wherein the compiled methods may be copied to new locations in the fast on-chip RAM, and updating the one or more execution pointers to point to the compiled methods in the fast on-chip RAM.