Memory Leak Detection via Graphical API Call Tracking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Memory leaks in electronic devices occur due to allocated RAM not being released, leading to resource shortages and adverse effects like application crashes, and are difficult to identify manually in large codebases.
Innovation Solution
A method and device that execute an application for a specified time, monitor memory API functions, identify unfreed memory allocations, and generate a graphical representation to visually detect memory leaks, along with a call tree to pinpoint the issue.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If manual line-by-line code review is performed to identify memory leaks, then memory leaks can be detected, but the process becomes extremely time-consuming and inefficient for large codebases with thousands or millions of lines of code
Solution Approach 1:
The patent introduces an intermediary tool (memory leak detection system) that automatically monitors memory allocations and API function calls. This intermediary system captures memory allocation events, tracks whether memory is properly freed, and generates reports without requiring manual code review, thus resolving the contradiction between detection accuracy and time consumption
Solution Approach 2:
The patent replaces the mechanical manual review process with an automated computational system that programmatically analyzes memory allocation patterns, tracks API function calls, and identifies memory leaks through algorithmic processing of runtime data, eliminating the time-consuming manual line-by-line code review
2Reliability
If the application continues to run to accumulate memory leaks for detection, then memory leak patterns become more visible, but the available RAM is depleted leading to application crashes or system instability
Solution Approach 1:
The patent performs preliminary monitoring and tracking of memory allocations as they occur during application execution. By continuously capturing and analyzing memory allocation events in real-time, the system identifies memory leaks before they cause resource exhaustion, allowing intervention while sufficient RAM remains available
Solution Approach 2:
The patent implements a feedback mechanism where the system continuously monitors memory allocation patterns, compares expected versus actual memory release behavior, and provides real-time feedback about potential memory leaks. This feedback loop enables early detection and correction before resource exhaustion occurs, maintaining system reliability
Data Source
AI summary
A device and method generates a graphical representation for memory leak detection. The method includes executing a selected application for a time period. The method includes determining a plurality of memory application programming interface (API) functions performed during the execution of the selected application in the time period. Each of the memory API functions request a chunk of a memory of the electronic device at a specified time. The method includes determining select ones of the memory API functions that do not release the respective chunk of the memory in the time period. The method includes generating the graphical representation including the selected memory API functions at the respective specified time for identification of a memory leak of the selected application.


