Legal claims defining the scope of protection, as filed with the USPTO.
1. A computer program product for managing memory in a computer system in which memory locations in use at any given time are represented as a set of memory objects in a first object graph that includes a system root object associated by references to each of said memory objects, the computer program product comprising: a computer-readable storage medium having computer-readable program code embodied therewith, wherein the computer-readable storage medium is not a transitory signal per se, the computer-readable program code executable by a processor to cause the processor to perform a method comprising: creating a second root object for said memory so as to form a second object graph for said memory; in response to a dereferencing of a first object from said first object graph, associating said dereferenced first object with said second object graph so that said second object graph comprises one or more dereferenced objects; removing, in response to associating said first object with said second object graph, the first object from memory; returning memory addresses allocated to the first object to a heap after removing the first object from memory; and reconstructing the first object graph using data stored in the second object graph.
2. The computer program product of claim 1 , wherein the method performed by the processor further comprises: identifying a second object in said first object graph that referenced said first object immediately prior to the dereferencing of said first object; and creating a reference from said second object graph to said second object so as to associate said first object in said second object graph with said second object in said first object graph.
3. The computer program product of claim 2 , wherein the method performed by the processor further comprises: creating a first metadata object in said second object graph, said first metadata object being arranged to provide said reference from said second object graph to said second object in said first object graph and to reference said first object in said second object graph.
4. The computer program product of claim 1 , wherein the method performed by the processor further comprises: identifying predetermined metadata for said first object that identifies the location of said first object in said first object graph immediately prior to said dereferencing; and storing said metadata in said second object graph in association with said first object.
5. The computer program product of claim 4 , wherein said metadata is stored in a second metadata object associated with said first object in said second object graph.
6. The computer program product of claim 4 , wherein said metadata comprises data identifying a field in said second object used to reference said first object immediately prior to said dereferencing of said first object from said second object.
7. The computer program product of claim 1 , wherein the method performed by the processor further comprises: in response to a first stage of garbage collection in which a first set of objects comprising all objects present in said first object graph are identified, identifying a second set of objects comprising objects present in said second object graph and not present in said first object graph; and saving predetermined data associated with each of said objects in said second set of objects prior to any further stage of garbage collection in which said second set of objects is deleted from said memory.
8. The computer program product of claim 7 , wherein said predetermined data comprises data identifying said first object.
9. The computer program product of claim 7 , wherein said predetermined data comprises data identifying said second object that referenced said first object immediately prior to the dereferencing of said first object.
10. The computer program product of claim 7 , wherein said predetermined data comprises data identifying a field in said second object that referenced said first object in said first object graph immediately prior to said dereferencing.
11. The computer program product of claim 7 , wherein the method performed by the processor further comprises: deleting said second set of object from said memory after saving the predetermined data associated with each of said objects in said second set of objects; and returning memory allocated to said second set of objects to a heap.
12. The computer program product of claim 1 , wherein the second object graph includes dereferenced objects from an application, wherein the dereferenced objects were removed from the first object graph as a result of a garbage collection process, and wherein the method performed by the processor further comprises: extracting dead object data from one or more dereferenced objects; storing the extracted dead object data; identifying, using dead object data, processes that created the dereferenced objects, the processes being part of the application; and modifying the application to improve memory usage of the processes.
13. The computer program product of claim 12 , wherein the first object graph is reconstructed using the dead extracted dead object data, and wherein modifying the application to improve the memory usage of the processes includes: determining, using the reconstructed first object graph, a process responsible for the creation of one or more dereferenced objects; and modifying the process to reduce the number of dereferenced objects created by the process.
14. The computer program product of claim 1 , wherein the second object graph includes dereferenced objects from an application, wherein the dereferenced objects were removed from the first object graph as a result of a garbage collection process, and wherein reconstructing the first object graph using data stored in the second object graph further comprises: extracting dead object data from one or more dereferenced objects; storing the extracted dead object data; and reconstructing the first object graph using the dead object data at a selected point in the associated processing of the application.
15. The computer program product of claim 1 , wherein the method performed by the processor further comprises: providing, by a memory manager, memory allocations from a first heap and a second heap, the first heap including storages for connected objects, the connected objects including the first object, the second heap including storage for a dead root object and metadata objects; creating, in response to the dereferencing the first object in the first heap, a corresponding set of metadata objects in the second heap, the corresponding set of metadata objects including a cross-heap reference to the dereferenced object in the first heap, wherein the first object is dereferenced in response to a first garbage collection process for the first heap, wherein the first garbage collection process identifies a first set of objects as candidates for removal from the first heap.
16. The computer program product of claim 15 , wherein the method performed by the processor further comprises: scanning each object identified as a candidate for removal in the first garbage collection process to identify and output associated object metadata for each candidate object; removing cross-heap references from the set of metadata objects in the second heap to candidate objects; and performing a second garbage collection process on the second heap, wherein all metadata objects in the second heap without a cross-heap reference to a live object in the first heap are removed from the second heap in the second garbage collection process.
17. The computer program product of claim 1 , wherein the method performed by the processor further comprises: identifying one or more candidate objects in the second object graph, the one or more candidate objects being connected objects in the second object graph that are not marked as being live; extracting dead object data from the one or more candidate objects; storing the extracted dead object data; removing, after extracting the dead object data from the one or more candidate objects, the one or more candidate objects from memory; and repairing the second object graph.
18. The computer program product of claim 17 , wherein the method performed by the processor further comprises: traversing the first object graph, wherein the first object graph is associated with a program; and marking one or more connected objects in the first object graph as live, the one or more connected objects being objects that are connected to a system root object, wherein an object is considered live if it is in use by the program.
19. The computer program product of claim 18 , wherein the identifying one or more candidate objects in the second object graph comprises: traversing the second object graph to identify one or more dereferenced objects in the second object graph that are marked as live, wherein the one or more candidate objects include objects in the second object graph that are not marked as live.
20. The computer program product of claim 19 , wherein the method performed by the processor further comprises: identifying metadata objects associated with the one or more live dereferenced objects; marking the metadata objects as live; and returning, after removing the one or more candidate objects from memory, memory allocations of the one or more candidate objects to a heap.
Unknown
July 24, 2018
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.