Memory Leak Detection via Object Segmentation and Counter Thresholds

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for detecting memory leaks, such as Oracle JRockit Mission Control and IBM HeapAnalyzer, are inadequate in identifying small leaks, leaks that occur over time, and leaks in systems with periodic memory usage issues, and they can excessively load the system and reduce accuracy due to recording access information for all objects.

Innovation Solution

A method involving producing an object in a first memory area, checking for a pointer, incrementing a counter, moving the object to a second area when the counter exceeds a threshold, clearing the counter, and outputting the object when it exceeds another threshold, to effectively detect and manage memory leaks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If entire access information of all objects is recorded to detect memory leaks, then detection accuracy is improved, but system load increases excessively

Engineering Contradiction:
Improvememory leak detection accuracyVSAvoidsystem load
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent segments memory into multiple areas (first area and second area) and divides object monitoring into different levels. Objects are selectively monitored based on their location and access patterns, rather than recording access information for all objects uniformly. This segmentation reduces the monitoring scope to only those objects that meet specific criteria (e.g., objects moved to second area), thereby reducing system load while maintaining detection accuracy for actual memory leaks.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies different monitoring strategies to different parts of the memory system. Objects in the first area are monitored with standard GC rules, while objects in the second area (which have been moved due to specific access patterns) are monitored with enhanced tracking. This local quality approach focuses monitoring resources on the most suspicious objects rather than uniformly monitoring all objects, reducing overall system load while improving leak detection accuracy where needed.

Inventive Principle:
Principle #3Local quality

2Measurement precision

If objects are monitored for extended periods to identify memory leaks, then detection accuracy is improved, but time consumption increases

Engineering Contradiction:
Improvememory leak detection accuracyVSAvoidtime consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary actions by moving objects to the second area before extensive monitoring is required. Objects that exhibit specific access patterns (being accessed after being in the first area for a certain period) are proactively moved to the second area, where they are then monitored with enhanced tracking. This preliminary classification reduces the time needed for subsequent monitoring, as only objects in the second area require extended observation to confirm memory leaks, rather than all objects needing prolonged monitoring.

Inventive Principle:
Principle #10Preliminary action

3Ease of operation

If GC is implemented to manage memory automatically, then programming complexity is reduced, but memory leaks from unused objects with persistent pointers cannot be detected

Engineering Contradiction:
Improveprogramming complexityVSAvoidmemory leak detection capability
Core Design Contradiction:
Ease of operationVSDifficulty of detecting and measuring

Solution Approach 1:

The patent introduces an intermediary mechanism (the area movement system with first area and second area) between the GC process and memory leak detection. This intermediary tracks object movement and access patterns, providing additional information to the detection system. The intermediary records which objects are moved to the second area and their access histories, enabling the detection system to identify memory leaks that would otherwise be invisible to standard GC tools, while maintaining the automatic memory management benefits of GC.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS8930661B2Operation processing device and method of detecting memory leak
Publication Date: 2015.01.06 FUJITSU LTD
  • US8930661B2 patent drawing
  • US8930661B2 patent drawing
  • US8930661B2 patent drawing

AI summary

A memory leak detecting method includes: producing an object which occupies an area on a first area of the memory; checking a presence of a pointer which points at the object separately so as to remove the object and to repeatedly carry out a process for increasing a counter value of the object; moving the object from the area on the first area of the memory to an area on the second area of the memory when the counter value exceeding a first threshold; and moving the object from the area on the second area to the area on the first area and clearing the counter value of the object upon the object occupying the area on the second area.