Abstracted managed code execution
AssigneeMicrosoft Corporation
InventorsDavide Massarenti, Donald R. Thompson
Life of this patent
Estimating the term…
Abstract
In a managed code execution environment in which resources are constrained, resources may be managed in accordance with weak references for which semantics are extended.
Claims27
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.
A computer-readable storage medium having one or more executable instructions stored thereon that, when executed, cause one or more processors to perform a method for memory management for abstracted managed code execution on a runtime execution environment, the method 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, the header comprising:
- at least one data field containing at least a portion of a reference to an object;
- at least one data field containing at least a portion of a serialization of the object;
- and
- at least one data field containing at least a parameterized value of the object;
- and
- storing the header.
A computer-readable storage medium having one or more executable instructions stored thereon that, when executed, cause one or more processors to perform a method for memory management for abstracted managed code execution on a runtime execution environment upon restarting of a computing device, the method comprising:
- scanning at least a portion of a memory for a header having at least one particular property, including priority property and identity value;
- verifying a checksum for the header;
- creating a reference targeting an object associated with the header 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 garbage collection property for the object, and an identifying value for the object;
- 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;
- calculating a checksum of the header and a serialization of the object;
- associating the calculated checksum with the header;
- and
- storing the header into memory.
An apparatus with storage media for memory management for abstracted managed code execution on a runtime execution environment, comprising:
- means for 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 means for creating a reference assembles at least one of a target property for the object, a garbage collection property for the object, and an identifying value for the object and wherein the means for creating a header for the object assembles a serialized version of the object, a value for a physical parameter 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;
- means for creating a header for the object;
- means for managing the object in accordance with the header;
- means for 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;
- means for 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;
- means for calculating a checksum of the header and the serialization of the object;
- means for associating the calculated checksum with the header;
- and
- means for storing the header into memory.
Dependencies are inferred from the claim text.