Memory Leak Detection via Time-Series Regression and Core Image Recovery
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Memory leaks in software systems can lead to resource exhaustion and performance degradation, especially in multi-user environments, where existing detection methods are inadequate, particularly for end-users with commercial software systems or third-party applications, and current runtime detection methods incur significant performance overhead.
Innovation Solution
A two-stage approach using nonlinear and non-parametric time-series regression analysis to detect memory leaks, followed by halting processes, generating core image files, and recovering leaked memory, minimizing application suspension and allowing off-line execution of the mark-sweep algorithm.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If mark-sweep garbage collection is used to detect and recover memory leaks at runtime, then memory leak detection capability is improved, but application performance deteriorates due to temporary suspension of the application
Solution Approach 1:
The patent segments the memory leak detection process into two distinct phases: an online phase that continuously monitors memory allocation patterns without suspending the application, and an offline phase that performs comprehensive mark-sweep analysis only on captured memory snapshots. This segmentation allows the system to maintain high detection capability while minimizing performance impact by limiting suspension to brief snapshot capture moments rather than continuous operation.
Solution Approach 2:
The patent implements preliminary action by continuously capturing and storing memory snapshots and allocation patterns during normal application operation. These pre-captured data structures are prepared in advance during the online phase, enabling the offline mark-sweep analysis to be performed on static snapshots rather than requiring suspension of running processes. The preliminary capture of heap dumps and allocation traces allows subsequent analysis to proceed without interfering with application execution.
2Measurement precision
If continuous monitoring and analysis of memory usage is performed to detect memory leaks early, then detection accuracy is improved, but system overhead increases
Solution Approach 1:
The patent applies partial action by implementing a two-tiered monitoring approach: continuous lightweight monitoring that tracks basic memory allocation patterns and statistics with minimal overhead, and intensive comprehensive analysis that is triggered only when anomalies are detected or during scheduled offline phases. This partial monitoring strategy maintains high detection accuracy for critical leak patterns while avoiding the constant overhead of full-spectrum analysis, thereby reducing overall system resource consumption.
3Measurement precision
If source code analysis methods are used to detect memory leaks, then detection precision is improved, but applicability deteriorates because source code is not available for end-user commercial software
Solution Approach 1:
The patent employs copying by creating detailed replicas of memory structures, allocation patterns, and object graphs from running processes without requiring access to the original source code. By copying and analyzing these runtime representations—including heap dumps, object reference chains, and allocation metadata—the system achieves source-code-level detection precision while maintaining broad applicability to any executable software. These copied data structures serve as substitutes for actual source code analysis, enabling the same detection capabilities across compiled and proprietary software.
Data Source
AI summary
Leaked memory in a computer system is detected and recovered by first detecting memory leakage within the computer system based on nonlinear and non-parametric time-series regression analysis of software telemetry data generated by one or more software process running on the computer system. If existence of memory leakage is detected, then memory that has leaked is specifically identified and recovered. This is done by halting one or more of the software processes, generating a core image file or files of the halted software process(es), and re-starting the halted process or processes without waiting for analysis of the core image file(s). Then, the core image file is evaluated to specifically identify leaked memory in the computer system based on the core image file. Finally, the identified leaked memory is recovered.


