IP Library › Granted Patent US 10,002,074
Granted Patent B2
US 10,002,074 · App. 15/174,047 · Granted Jun 19, 2018

Non-intrusive storage of garbage collector-specific management data

Inventors: Christine H. Flood (Westford, MA); Andrew Edward Dinn (Newcastle upon Tyne, GB)
Assignee: Red Hat, Inc.
G06F12/0253G06F12/0269G06F2212/1016G06F2212/1044
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,002,074
App. No.
15/174,047
Granted
Jun 19, 2018
Kind
B2
Abstract

A system, method, and techniques for managing memory are provided. An example method includes identifying a plurality of regions in a heap storing one or more objects of a first type and one or more objects of a second type. Each object of the first type includes application data and management data, and the management data is used by a managed runtime to manage the application data. The method also includes determining an object of the first type to read and computing, based on a last-known memory address of the object of the first type, a memory address of an object of the second type storing a current memory address of the object of the first type. The method further includes reading the current memory address stored in the object of the second type and locating the object of the first type at the read memory address.

Claims (31)

1. A method of managing memory, the method comprising:

identifying a plurality of regions in a heap storing one or more objects of a first type and one or more objects of a second type, the plurality of regions including a target collection region and a destination region;

determining whether a last-known memory address of a first object of the first type is located in the target collection region; and

in response to a determination that the last-known memory address of the first object is located in the target collection region:

computing, based on an offset from the last-known memory address of the first object, a memory address of a second object of the second type, the second object storing a current memory address of the first object;

reading the current memory address of the first object stored in the second object; and

locating the first object at the read memory address, wherein the located first object is stored in the destination region, and the last-known memory address of the first object is different from the current memory address of the first object, and wherein the first object has been evacuated from the target collection region to the destination region.

2. The method of claim 1 , wherein the computing includes subtracting the offset from the last-known memory address of the first object, and the reading the current memory address includes reading a word stored at the memory address computed based on subtracting the offset from the last-known memory address of the first object.

3. The method of claim 1 , wherein the computing includes adding the offset to the last-known memory address of the first object, and the reading the current memory address includes reading a word stored at the memory address computed based on adding the offset to the last-known memory address of the first object.

4. The method of claim 1 , wherein the last-known memory address of the first object is adjacent to the memory address of the second object.

5. The method of claim 1 , wherein the memory address of the second object precedes the last-known memory address of the first object.

6. The method of claim 1 , further comprising:

in response to a determination that the last-known memory address of the first object is not located in the target collection region, locating the first object at the last-known memory address.

7. A system for managing memory, the method comprising:

a memory including a heap, wherein the heap is partitioned into a plurality of regions and stores one or more objects of a first type and one or more objects of a second type, and the plurality of regions includes a target collection region and a destination region; one or more processors coupled to the memory; and

one or more mutator threads executing on the one or more processors, wherein a mutator thread determines whether a last-known memory address of a first object of the first type is located in the target collection region, wherein in response to a determination that the last-known memory address of the first object is located in the target collection region, the mutator thread computes, based on an offset from the last-known memory address of the first object, a memory address of a second object of the second type, reads a current memory address of the first object stored in the second object, and locates the first object at the read memory address, wherein the second object stores the current memory address of the first object, wherein the located first object is stored in the destination region, and the last-known memory address of the first object is different from the current memory address of the first object, and wherein the first object has been evacuated from the target collection region to the destination region.

8. The system of claim 7 , wherein the mutator thread subtracts the offset from the last-known memory address of the first object, and reads the current memory address by reading a word stored at the memory address computed based on subtracting the offset from the last-known memory address of the first object.

9. The system of claim 7 , wherein the mutator thread computes the memory address of the second object by adding the offset to the last-known memory address of the first object, and reads the current memory address by reading a word stored at the memory address computed based on adding the offset to the last-known memory address of the first object.

10. The system of claim 7 , wherein the last-known memory address of the first object is adjacent to the memory address of the second object.

11. The system of claim 7 , wherein the memory address of the second object precedes the last-known memory address of the first object.

12. The system of claim 7 , wherein the located first object is stored in the target collection region.

13. The system of claim 7 , wherein in response to a determination that the last-known memory address of the first object is not located in the target collection region, the mutator thread locates the first object at the last-known memory address.

14. A non-transitory machine-readable medium comprising a plurality of machine-readable instructions that when executed by one or more processors is adapted to cause the one or more processors to perform a method comprising:

identifying a plurality of regions in a heap storing one or more objects of a first type and one or more objects of a second type, the plurality of regions including a target collection region and a destination region;

determining whether a last-known memory address of a first object of the first type is located in the target collection region; and

in response to a determination that the last-known memory address of the first object is located in the target collection region:

computing, based on an offset from the last-known memory address of the first object, a memory address of a second object of the second type, the second object storing a current memory address of the first object;

reading the current memory address of the first object stored in the second object; and

locating the first object at the read memory address, wherein the located first object is stored in the destination region, and the last-known memory address of the first object is different from the current memory address of the first object, and

wherein the first object has been evacuated from the target collection region to the destination region.

15. The method of claim 1 , wherein the located first object is stored in the target collection region.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 6, 2016
From: DINN, ANDREW EDWARD; FLOOD, CHRISTINE H.
To: RED HAT, INC.
Reel/Frame 038817/0902 →
Continuity (2)
Continuation 14018279 · Sep 4, 2013
Related Publication 20160283371A1 · Sep 29, 2016
Cited By (7)
US 12,190,112 US 12,197,324 US 12,306,750 US 12,399,820 US 12,487,924 US 12,561,239 US 12,743,575