Patent ID: 7600223

Claim:
A method for memory management for abstracted managed code execution on a runtime execution environment, comprising: creating a reference to an object based at least in part on one or more weak references for which semantics have been extended, wherein the reference assembles at least one of a target property for the object, a clean-up priority property for the object, and an identifying value for the object; creating a plurality of references to different objects wherein each of the plurality of references comprises the clean-up priority property; sorting the plurality of references by respective clean-up priority property, such that when multiple implementations of each of the plurality of references are accessed, that implementation of the plurality of references is moved to a leading position of a sub-list of references having the same clean-up priority property; reclaiming the different objects referenced by the plurality of references in an ascending order based on the clean-up priority property associated with respective implementations of one of each reference during the garbage collection process only after the memory available to the runtime execution environment falls below the predetermined threshold level, wherein the lower priority and older objects are reclaimed first; creating a header for the object comprising at least one property from the reference and a serialization of the object and wherein creating a header for the object assembles a serialized version of the object, a value for a length value of the object, and at least one of a target property for the object, a garbage collection property for the object, and an identifying value for the object; calculating a checksum of the header and the serialization of the object; associating the calculated checksum with the header; and storing the header into memory.