Garbage Collection Control via Memory Pre-commitment

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In managed code computing environments, performance-sensitive applications face interruptions due to garbage collection operations, which can be detrimental in industries like market trading where even short interruptions can result in losses, and pre-allocating memory is impractical and diminishes the productivity benefits of using managed code.

Innovation Solution

A method and API for controlling garbage collection that allows users to specify a quantum within which garbage collection should not occur, enabling memory pre-commitment to prevent interruptions, including options for pre-committing memory for small and large object heaps and disabling full blocking garbage collection.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If garbage collection is performed to reclaim memory, then memory management is automated and productivity is improved, but user threads are suspended causing performance interruptions

Engineering Contradiction:
Improveautomatic memory managementVSAvoidthread suspension time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system pre-allocates memory regions before they are needed for garbage collection. By anticipating future memory reclamation needs and reserving space in advance, the garbage collector can operate on pre-allocated memory without suspending user threads, thus maintaining both automatic memory management and continuous execution.

Inventive Principle:
Principle #10Preliminary action

2Loss of time

If pre-allocation of memory objects is performed to prevent garbage collection, then garbage collection interruptions are avoided, but developer productivity is diminished

Engineering Contradiction:
Improveinterruption timeVSAvoiddeveloper productivity
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

The system automatically manages memory pre-allocation without requiring developer intervention. The garbage collection system monitors memory usage patterns and automatically pre-allocates appropriate memory regions, eliminating the need for developers to manually pre-allocate objects while still preventing garbage collection interruptions.

Inventive Principle:
Principle #25Self-service

3Loss of time

If memory is pre-committed to prevent garbage collection, then garbage collection operations are blocked, but available memory for other operations is reduced

Engineering Contradiction:
Improvegarbage collection interruptionVSAvoidavailable memory
Core Design Contradiction:
Loss of timeVSQuantity of substance

Solution Approach 1:

The system pre-commits only the necessary portion of memory required to prevent garbage collection interruptions, rather than committing all available memory. By calculating and allocating only the minimum required pre-committed memory based on actual usage patterns, the system prevents interruptions while leaving sufficient memory available for other operations.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9804962B2Garbage collection control in managed code
Publication Date: 2017.10.31 MICROSOFT TECHNOLOGY LICENSING LLC
  • US9804962B2 patent drawing
  • US9804962B2 patent drawing
  • US9804962B2 patent drawing

AI summary

Controlling garbage collection operations. The method includes setting up garbage collection to collect objects that are no longer in use in a managed code environment. The method further includes receiving managed code input specifying a desired quantum within which it is desired that garbage collection not be performed. The method further includes performing a computing operation to determine the desired quantum can likely be met. The method further includes running memory operations within the quantum without running the initialized garbage collection.