Allocation Trace Memory Leak Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current garbage collection approaches in platform-independent programming languages, such as Java, are ineffective in detecting and eliminating memory leaks, which can lead to virtual machine crashes and are difficult to identify, often requiring significant effort and time to rectify.

Innovation Solution

A method that creates an allocation trace for a running program suspected of causing memory leaks, identifies memory leak candidates by examining active memory, and generates information about the leaking objects, including their location in the program code, without the need for a heap dump, allowing for real-time processing and efficient memory management.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional garbage collection is used, then memory management is automated, but memory leaks cannot be detected

Engineering Contradiction:
Improvememory managementVSAvoidmemory leak detection
Core Design Contradiction:
ReliabilityVSDifficulty of detecting and measuring

Solution Approach 1:

The system performs preliminary tracking of object allocation and retention during program execution. By maintaining allocation traces and monitoring object references continuously, the system prepares detection data in advance, enabling memory leaks to be identified when they occur without requiring post-mortem analysis.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback mechanisms by monitoring object allocation patterns and retention states in real-time. When objects are allocated but not properly released, the system detects this anomaly through continuous monitoring of memory structures and provides feedback about potential memory leaks, enabling proactive identification rather than reactive cleanup.

Inventive Principle:
Principle #23Feedback

2Difficulty of detecting and measuring

If heap dumps are used to identify leaking data structures, then memory leak detection is possible, but the process is time-consuming and requires significant effort

Engineering Contradiction:
Improvememory leak detectionVSAvoidtime to rectify memory leaks
Core Design Contradiction:
Difficulty of detecting and measuringVSLoss of time

Solution Approach 1:

Instead of performing time-consuming post-mortem analysis with heap dumps, the system performs preliminary tracking of object allocation and reference chains during normal program execution. This continuous monitoring builds detection data in real-time, eliminating the need for separate dump-and-analyze cycles that consume significant time and resources.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system maintains continuous monitoring of memory structures, allocation traces, and object references throughout program execution. This uninterrupted detection process ensures that memory leaks are identified at the moment they occur, rather than requiring periodic or post-execution analysis, thereby reducing the time and effort needed to rectify memory issues.

Inventive Principle:
Principle #20Continuity of useful action

3Difficulty of detecting and measuring

If allocation traces and heap dumps are combined to identify memory leaks, then leak sources can be located, but the complexity of the system increases

Engineering Contradiction:
Improvememory leak identificationVSAvoiddetection system
Core Design Contradiction:
Difficulty of detecting and measuringVSDevice complexity

Solution Approach 1:

The system merges the allocation trace functionality with the memory monitoring capabilities into a unified detection mechanism. By integrating object allocation tracking, reference monitoring, and memory structure analysis into a single coherent system, the patent eliminates the need for separate heap dump generation and allocation trace analysis, thereby reducing overall system complexity while maintaining effective memory leak identification.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS9164872B2Tracking of program objects during request processing
Publication Date: 2015.10.20 SAP SE
  • US9164872B2 patent drawing
  • US9164872B2 patent drawing
  • US9164872B2 patent drawing

AI summary

Coding issues that create runtime memory leaks, for example in programs coded in a platform-independent programming language such as Java™, can be isolated at the program code line level. An allocation trace that retains, in active memory, a unique object identifier for each of a plurality of objects instantiated during program execution and an address in the active memory where each object is stored can be created. Memory leak candidates can be identified by directly examining contents of the active memory to identify one or more data structures that are increasing in size over time. The allocation trace can be combined with the identified memory leak candidates to generate information about at least one identified leaking object.