Java Heap Segmentation for Small and Large Object Areas

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Java Virtual Machine (JVM) performance is degraded due to frequent garbage collection and fragmentation in the Java heap, leading to increased allocation costs and overhead, as the JVM manages a single contiguous memory space for objects of varying sizes without efficient organization.

Innovation Solution

The JVM allocates a memory heap with separate small and large object areas growing in opposite directions, using a predetermined allocation policy to manage object allocation, compaction, expansion, and shrinkage independently, reducing garbage collection overhead and fragmentation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If a single contiguous memory space is used for all objects, then memory allocation is simple, but fragmentation occurs leading to frequent garbage collection and degraded performance

Engineering Contradiction:
Improvememory management complexityVSAvoidJVM performance
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent divides the Java heap into separate small object area and large object area. This segmentation prevents fragmentation from affecting the entire heap, reducing garbage collection frequency and improving JVM performance while maintaining manageable complexity through organized memory regions.

Inventive Principle:
Principle #1Segmentation

2Reliability

If frequent garbage collection is performed to clean unreferenced objects, then memory is freed for continued allocation, but allocation cost increases due to heap fragmentation

Engineering Contradiction:
Improvememory availabilityVSAvoidallocation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

By segmenting the heap into small and large object areas, the patent isolates fragmentation effects to individual regions. This allows garbage collection to operate more efficiently on smaller, less fragmented areas, reducing the time cost of allocation while maintaining memory availability through targeted cleanup operations.

Inventive Principle:
Principle #1Segmentation

3Productivity

If heap compaction is performed to reduce fragmentation, then allocation efficiency improves, but the expensive compaction process degrades overall performance

Engineering Contradiction:
Improveallocation efficiencyVSAvoidcompaction time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent reduces the need for frequent heap compaction by segmenting the heap into small and large object areas. Each segment can be managed independently, preventing system-wide fragmentation and reducing allocation efficiency losses without requiring expensive full-heap compaction operations, thereby improving overall performance.

Inventive Principle:
Principle #1Segmentation

4Quantity of substance

If the Java heap grows to maximum size to accommodate allocated objects, then object allocation capacity increases, but memory fragmentation increases leading to more frequent cleanup operations

Engineering Contradiction:
Improveobject storage capacityVSAvoidgarbage collection frequency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

By dividing the heap into small and large object areas, the patent enables independent management of each segment's growth and fragmentation. This allows the heap to grow to maximum capacity while maintaining lower fragmentation levels in each segment, reducing garbage collection frequency despite increased object storage capacity.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9037830B2Organization of a small object area and a large object area in a Java heap
Publication Date: 2015.05.19 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9037830B2 patent drawing
  • US9037830B2 patent drawing
  • US9037830B2 patent drawing

AI summary

A memory heap is allocated to a contiguous range of memory. One end of the heap is designated as a small object area. The other end of the heap is designated as a large object area. When the two object areas grow, the small object area grows inward within the heap toward the large object area, and the large object area grows inward within the heap toward the small object area.