# US 11,029,876 B2 · Determining an age category for an object stored in a heap

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,029,876 B2
- Document ID: US11029876B2
- Status: Granted
- Kind: B2
- Application number: 16/425,558
- Filed: 2019-05-29
- Published: 2019-09-26
- Granted: 2021-06-08
- Earliest claimed: 2017-06-08
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Marcus Mattias Hirt; Erik Kristofer Gahlin
- Web page: https://patentgrep.com/patent/US11029876B2

## CPC

- G06F 3/0652: {Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0653: {Monitoring storage devices or systems}
- G06F 3/0664: {at device level, e.g. emulation of a storage device or system}
- G06F 3/0673: {Single storage device}
- G06F 9/44521: {Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 12/02: Addressing or allocation; Relocation (program address sequencing G06F9/00; arrangements for selecting an address in a digital store G11C8/00)
- G06F 12/0276: {Generational garbage collection}
- G06F 8/427: {Parsing}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2212/1024: Latency reduction
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/152: Virtualized environment, e.g. logically partitioned system
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for determining an age category for an object and identifying objects for memory leak analysis based on age categories are described. An age category classifier generates a set of age categories, each corresponding to a respective time interval. The age category classifier monitors garbage collection processes on the heap. The age category classifier determines a current age category based on a duration of time that has elapsed between (a) an initiation of a current garbage collection cycle and (b) a reference event. The age category classifier identifies objects transferred from one object group to another object group during the current garbage collection cycle. The age category classifier stores the current age category as the transfer age category in the headers of the transferred objects. The transfer age categories of the objects may be used for reducing the number of objects that are analyzed in a memory leak analysis.

## Claims

### Claim 1

One or more non-transitory machine-readable media storing instructions which, when executed by one or more processors, cause:
generating a plurality of age categories corresponding to a respective plurality of time intervals;
determining a particular duration of time that has elapsed between (a) a particular event associated with a garbage collection cycle and (b) a reference event;
determining a particular time interval, of the plurality of time intervals, that includes the particular duration of time that has elapsed between (a) the particular event associated with the garbage collection cycle and (b) the reference event;
determining a current age category, from the plurality of age categories, corresponding to the particular time interval;
responsive to determining that a first object is transferred from a first object group to a second object group during the garbage collection cycle: storing the current age category as a transfer age category in a header of the first object;
wherein objects transferred from the first object group to the second object group during a same garbage collection cycle are assigned to the same current age category of the plurality of age categories.

### Claim 2 (depends on 1)

The one or more media of claim 1, further storing instructions which, when executed by the one or more processors, cause:
storing the current age category as the transfer age category in headers of all objects transferred from the first object group to the second object group during the garbage collection cycle.

### Claim 3 (depends on 1)

The one or more media of claim 1, wherein the particular event comprises an initiation of the garbage collection cycle.

### Claim 4 (depends on 1)

The one or more media of claim 1, wherein the particular event is not an initiation or completion of a transfer of the first object from the first object group to the second object group.

### Claim 5 (depends on 1)

The one or more media of claim 1, wherein the reference event comprises an initiation of a virtual machine that maintains the first object.

### Claim 6 (depends on 1)

The one or more media of claim 1, wherein determining the current age category is performed prior to determining that the first object is transferred from the first object group to the second object group during the garbage collection cycle.

### Claim 7 (depends on 1)

The one or more media of claim 1, wherein the respective plurality of time intervals corresponding to the plurality of age categories are mutually exclusive.

### Claim 8 (depends on 1)

The one or more media of claim 1, wherein sizes of the respective plurality of time intervals corresponding to the plurality of age categories are different.

### Claim 9 (depends on 1)

The one or more media of claim 1, further storing instructions which cause:
generating the respective plurality of time intervals corresponding to the plurality of age categories without regard to a time associated with an occurrence of the garbage collection cycle.

### Claim 10 (depends on 1)

The one or more media of claim 1, wherein the first object consists of the header and a payload.

### Claim 11 (depends on 1)

The one or more media of claim 1, wherein the header is configured to store information for at least one of: managing storage of the first object in a memory space, and interpreting a payload of the first object.

### Claim 12 (depends on 1)

The one or more media of claim 1, wherein:
after transfer of the first object from the first object group to the second object group: a plurality of bits in the header is configured to store information identifying the transfer age category of the first object, the transfer age category being selected from the plurality of age categories; and
prior to the transfer of the first object from the first object group to the second object group: the plurality of bits is configured to store information associated with the first object, other than one of the plurality of age categories.

### Claim 13 (depends on 1)

The one or more media of claim 1, further storing instructions which, when executed by the one or more processors, cause:
subsequent to transfer of the first object from the first object group to the second object group:
determining a minimum duration of time that has elapsed between (a) the transfer of the first object from the first object group to the second object group, and (b) the reference event, based on the transfer age category stored in the header of the first object, without using any information external to the first object.

### Claim 14 (depends on 1)

The one or more media of claim 1, wherein:
determining the particular duration of time that has elapsed between (a) the particular event associated with the garbage collection cycle and (b) the reference event comprises: accessing a system clock to determine a system time; and
storing the current age category as the transfer age category in headers of a plurality of objects, including the first object, transferred from the first object group to the second object group during the garbage collection cycle is not based on any additional accesses to any system clock.

### Claim 15 (depends on 1)

The one or more media of claim 1, wherein the first object group comprises a first generation in a garbage collection scheme and the second object group comprises a second generation in the garbage collection scheme, and the first generation is younger than the second generation.

### Claim 16 (depends on 1)

The one or more media of claim 1, further storing instructions which, when executed by the one or more processors, cause:
determining a second duration of time that has elapsed between (a) a second event associated with a second garbage collection cycle and (b) the reference event;
determining the current age category, from the plurality of age categories, corresponding to the second duration of time that has elapsed between (a) the second event associated with the second garbage collection cycle and (b) the reference event;
responsive to determining that a second object is transferred from the first object group to the second object group during the second garbage collection cycle: storing the current age category as a second transfer age category in a second header of the second object;
selecting the second object, but not the first object, for memory leak analysis, based on the transfer age category of the first object and the second transfer age category of the second object.

### Claim 17 (depends on 16)

The one or more media of claim 16, further storing instructions which, when executed by the one or more processors, cause:
performing the memory leak analysis on the second object, without performing the memory leak analysis on the first object.

### Claim 18

A system, comprising:
at least one device including a hardware processor; and
the system being configured to perform operations comprising:
generating a plurality of age categories corresponding to a respective plurality of time intervals;
determining a particular duration of time that has elapsed between (a) a particular event associated with a garbage collection cycle and (b) a reference event;
determining a particular time interval, of the plurality of time intervals, that includes the particular duration of time that has elapsed between (a) the particular event associated with the garbage collection cycle and (b) the reference event;
determining a current age category, from the plurality of age categories, corresponding to the particular time interval;
responsive to determining that a first object is transferred from a first object group to a second object group during the garbage collection cycle: storing the current age category as a transfer age category in a header of the first object;
wherein objects transferred from the first object group to the second object group during a same garbage collection cycle are assigned to the same current age category of the plurality of age categories.

### Claim 19

A method, comprising:
generating a plurality of age categories corresponding to a respective plurality of time intervals;
determining a particular duration of time that has elapsed between (a) a particular event associated with a garbage collection cycle and (b) a reference event;
determining a particular time interval, of the plurality of time intervals, that includes the particular duration of time that has elapsed between (a) the particular event associated with the garbage collection cycle and (b) the reference event;
determining a current age category, from the plurality of age categories, corresponding to the particular time interval;
responsive to determining that a first object is transferred from a first object group to a second object group during the garbage collection cycle: storing the current age category as a transfer age category in a header of the first object;
wherein objects transferred from the first object group to the second object group during a same garbage collection cycle are assigned to the same current age category of the plurality of age categories;
wherein the method is performed by at least one device including a hardware processor.

### Claim 20

One or more non-transitory machine-readable media storing instructions which, when executed by one or more processors, cause:
identifying a plurality of age categories corresponding to a respective plurality of time intervals;
determining a particular duration of time that has elapsed between (a) a particular event associated with a garbage collection cycle and (b) a reference event;
determining a particular time interval, of the plurality of time intervals, that includes the particular duration of time that has elapsed between (a) the particular event associated with the garbage collection cycle and (b) the reference event;
determining a current age category, from the plurality of age categories, corresponding to the particular time interval;
responsive to determining that a first object is transferred from a first object group to a second object group during the garbage collection cycle: storing the current age category as a first transfer age category in a first header of the first object;
responsive to determining that a second object is transferred from the first object group to the second object group during the garbage collection cycle: storing the same current age category as a second transfer age category in a second header of the second object;
wherein the same reference event is commonly used for determining that the same current age category is associated with the first object and the second object.
