Arena-Based Memory Management with Deferred Garbage Collection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing arena-based memory management systems often reclaim memory prematurely, leading to the deletion of live objects due to direct response to deallocation calls, which can be inefficient and unsafe.

Innovation Solution

A mechanism is introduced to delay the deallocation of arenas based on heap-related parameters, such as memory load or arena-to-heap size ratio, triggering garbage collection only when certain thresholds are surpassed, preserving live objects and relocating them to a managed heap before deallocating the arena.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If arena-based memory management reclaims memory immediately upon deallocation call, then memory is freed quickly, but live objects may be deleted prematurely

Engineering Contradiction:
Improvememory reclamation speedVSAvoidobject safety
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary garbage collection before arena deallocation to identify and preserve live objects. When a deallocation call is received, the system triggers a garbage collection process that scans the arena for live objects and relocates them to the managed heap before the arena memory is freed, preventing premature deletion of still-needed objects.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The managed heap serves as an intermediary between the arena and freed memory. Live objects are transferred from the arena to the managed heap, which acts as a buffer zone. This intermediary structure allows the arena to be deallocated while ensuring that any objects still in use are safely stored in the heap, resolving the conflict between quick reclamation and object safety.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If garbage collection is triggered on every deallocation call, then live objects are preserved, but system performance deteriorates

Engineering Contradiction:
Improveobject safetyVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Instead of performing full garbage collection on every deallocation call, the system applies partial action by only triggering GC when necessary. The selective triggering mechanism evaluates conditions (such as arena utilization thresholds or explicit GC requests) to determine when garbage collection should occur, avoiding unnecessary GC operations that would degrade performance while still ensuring object safety when needed.

Inventive Principle:
Principle #16Partial or excessive action

3Quantity of substance

If arena memory is reused immediately, then memory efficiency improves, but complexity of memory management increases

Engineering Contradiction:
Improvememory utilizationVSAvoidmemory management complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The system merges arena-based allocation with garbage-collected heap management into a unified memory management framework. The managed heap and arena systems work together, with the heap serving as both a storage area for live objects and a source of reusable memory for arenas. This integration allows arenas to be deallocated and reused while maintaining object safety through the heap's garbage collection mechanism, improving memory utilization without proportionally increasing complexity.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentEP3807771B1Arena-based memory management
Publication Date: 2025.08.06 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3807771B1 patent drawingFigure 1
  • EP3807771B1 patent drawingFigure 2~3

AI summary

An arena-based memory management system is disclosed. In response to a call to reclaim memory storing a plurality of objects allocated in an arena, a garbage collection of the arena is triggered based on heap-related parameter. A live object of the plurality of objects is preserved with the garbage collection