Zero-Copy Large Object Promotion in Generational Heap GC

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current garbage collection methods face challenges in efficiently promoting large objects from the young generation to the old generation, particularly in region-based garbage collectors, as they often require costly copying and can lead to increased pressure on the young generation and premature tenuring of objects.

Innovation Solution

The introduction of large memory regions and a system that promotes large young objects to large old objects without copying by setting region types from young to old in the region table, scavenging references, and releasing unvisited memory regions, allowing for efficient tenuring of large objects at no-copying cost.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If large young objects are promoted to old generation using copying mechanism, then objects reach maturity and can be collected independently, but memory and resource overhead increases significantly due to the copying cost

Engineering Contradiction:
Improveobject maturityVSAvoidmemory and resource overhead
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent applies copying selectively only to small objects that need to be evacuated during young generation collection, while large objects that survive the collection cycle are promoted to old generation without copying. This resolves the contradiction by eliminating unnecessary copying of large objects while still maintaining the copying mechanism for small objects that require evacuation.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent changes the parameter of object promotion from 'copying required' to 'promotion without copying' based on object size and survival status. Large objects that survive young generation collection are promoted by changing their generation status parameter without physical copying, thereby reducing memory overhead while maintaining reliability.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If copying mechanism is used for all objects in young generation, then all objects can be collected and promoted uniformly, but large objects cause excessive memory pressure and resource consumption

Engineering Contradiction:
Improvecollection efficiencyVSAvoidmemory pressure
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent segments the object population into small objects and large objects, applying different collection and promotion strategies to each segment. Small objects undergo copying collection, while large objects are handled through a separate promotion path that avoids copying, thereby improving overall collection efficiency while reducing memory pressure from large object handling.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies partial copying action only to small objects that need evacuation, rather than copying all objects. This partial action approach maintains collection efficiency for small objects while avoiding the excessive memory pressure that would result from copying large objects.

Inventive Principle:
Principle #16Partial or excessive action

3Loss of energy

If large objects are allocated directly in old generation, then no copying is needed for promotion, but young generation pressure increases and objects mature prematurely

Engineering Contradiction:
Improvecopying costVSAvoidobject lifetime
Core Design Contradiction:
Loss of energyVSLoss of time

Solution Approach 1:

The patent allocates large objects to a special large object space before they are fully mature, allowing them to reside in a protected space during their young phase. This preliminary action prevents them from exerting pressure on the regular young generation and avoids premature tenuring, while still enabling promotion without copying later.

Inventive Principle:
Principle #10Preliminary action

4Speed

If region-based garbage collection is used, then pause time is limited and responsiveness improves, but large object promotion becomes more complex with region type management

Engineering Contradiction:
ImproveresponsivenessVSAvoidregion type management
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent extracts large object management from the regular region-based collection mechanism by creating a separate large object space and dedicated promotion path. This extraction simplifies region type management by removing large objects from the complex young/old region type system, while still maintaining the responsiveness benefits of region-based collection for small objects.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS8250121B2Zero-copy maturing of large objects in generational heap with copying collection
Publication Date: 2012.08.21 ORACLE AMERICAN INC
  • US8250121B2 patent drawing
  • US8250121B2 patent drawing
  • US8250121B2 patent drawing

AI summary

A method for performing garbage collection promotion, comprising determining that an age of a large young object is greater than a predetermined tenuring threshold, wherein the predetermined tenuring threshold specifies an age beyond which objects are promoted, setting a plurality of types of a plurality of large memory regions from young to old to promote the large young object to a large old object, wherein the plurality of large memory regions host the large young object, scavenging references of the large old object, wherein the large old object is a large promoted object, scanning a large young object list to identify a plurality of unvisited large young objects, wherein a plurality of visited bits of the plurality of unvisited large young objects are unset, and releasing a plurality of unvisited large memory regions, wherein the unvisited large memory regions host the plurality of unvisited large young objects.