Declarative pinning
AssigneeMicrosoft Corporation
InventorsPatrick H. Dussud, Vance P. Morrison
Life of this patent
Estimating the term…
Abstract
A system and method is provided for efficiently pinning references to the managed heap. The system and method allow for references to managed objects to be declared as pinned during a call to unmanaged code. The references are then reported as pinned to a garbage collector in response to invocation of a garbage collection service. The reference can be declared as pinned by a programmer within the source code or automatically invoked at run-time based on an unsafe condition. The garbage collection service will not move or relocate objects that are referenced by the active pinned local variables. If a garbage collection does not occur, the fact that the local variables are declared pinned is ignored.
Claims7
A system for executing code in real-time, the system comprising:
- a compiler that compiles source code into an intermediate definition language and then into executable code for executing one or more programs, the compiler declaring at least one reference as pinned during compiling of the source code into the intermediate definition language;
- a processor that executes the executable code and stores objects within a memory heap and references in a stack during execution of the executable code;
- and
- a memory management system that locates the references on a stack and objects referenced by the references and reclaims storage being utilized by unused objects upon invocation of the memory management system, the objects referenced by pinned references being held fixed in memory during the reclaiming of storage.
Dependencies are inferred from the claim text.