Manual memory management using lazy patching
First Claim
Patent Images
1. A method of manual memory management comprising:
- in response to detecting an access violation when an invalid reference to a child object in a manual heap is used;
identifying a source of the access violation in a register or stack;
identifying a parent object in the manual heap, wherein the parent object is an object from which the source was loaded into the register or stack;
determining an updated reference for the child object using stored mapping data; and
replacing the invalid reference in the source with the updated reference to the child object in the parent object.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of manual memory management is described. In response to detecting an access violation triggered by the use of an invalid reference to an object in a manual heap, a source of the access in a register or stack is identified. An updated reference for the object using stored mapping data is determined and used to replace the invalid reference in the source.
-
Citations
20 Claims
-
1. A method of manual memory management comprising:
in response to detecting an access violation when an invalid reference to a child object in a manual heap is used; identifying a source of the access violation in a register or stack; identifying a parent object in the manual heap, wherein the parent object is an object from which the source was loaded into the register or stack; determining an updated reference for the child object using stored mapping data; and replacing the invalid reference in the source with the updated reference to the child object in the parent object. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
14. A method of memory reclamation comprising:
-
in response to deallocation of an object in a manual heap, marking the object as freed, wherein the manual heap is defined in virtual address space and divided into a plurality of pages; in response to determining that an entire page of the virtual address space comprises only freed objects and no live objects, unmapping the page from physical address space; and in response to determining that fragmentation of one or more pages of the virtual address space exceeds a fragmentation threshold, selecting a page from the one or more pages, moving all live objects from the selected page to another page and unmapping the selected page from physical address space. - View Dependent Claims (15, 16, 17, 18, 20)
-
-
19. A method comprising two or more of:
-
modifying, in a compiler, generation of code to explicitly expose references to a parent object in a stack or registers, wherein a parent object is an object in a manual heap that contains a reference to a second object, wherein the second object is a child object corresponding to the parent object; extending, in the compiler, a lifetime of a variable containing a reference to a parent object such that the variable containing the reference to the parent object is in a register or stack when any references to a corresponding child object are used; and instrumenting, in the compiler, memory management patches that return a child object to push a reference to the corresponding parent object into a circular buffer.
-
Specification