Application Memory Management for Bitness-Based Leak Handling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Memory leaks occur due to unallocated memory not being released, leading to reduced system resources and affecting normal operations, with existing solutions failing to consider user experience in application management.
Innovation Solution
A memory management method that checks virtual memory occupancy and performs targeted process-killing operations based on application bitness, duration in background state, and user-defined presets to manage memory resources effectively.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If existing memory management solutions terminate applications when memory leaks are detected, then system memory resources are recovered, but user experience deteriorates due to unnecessary application termination
Solution Approach 1:
The patent changes the parameter of memory threshold dynamically based on application bitness. For 32-bit applications, a lower memory threshold is set since they have inherent memory limitations, while 64-bit applications are given higher thresholds. This allows the system to be more lenient with 64-bit applications that may legitimately use more memory, reducing unnecessary terminations and improving user experience while still recovering memory from truly problematic applications.
2Quantity of substance
If memory threshold is set low to recover more memory, then system memory resources increase, but false positives increase causing legitimate applications to be terminated
Solution Approach 1:
The patent applies local quality by setting different memory thresholds for different application types (32-bit vs 64-bit). Instead of using a uniform threshold, the system tailors the threshold to the specific characteristics of each application type, allowing more lenient monitoring for 64-bit applications that may legitimately require more memory while maintaining strict monitoring for 32-bit applications.
Solution Approach 2:
The patent dynamically changes the memory threshold parameter based on the detected bitness of the application. When a 64-bit application is detected, a higher threshold is applied; when a 32-bit application is detected, a lower threshold is applied. This adaptive parameter adjustment reduces false positives while maintaining effective memory leak detection.
3Ease of operation
If memory threshold is set high to avoid false positives, then user experience is maintained, but system memory resources are insufficiently recovered
Solution Approach 1:
The patent resolves this contradiction by making the memory threshold parameter adaptive rather than static. The threshold automatically adjusts based on application bitness: lower for 32-bit applications to maximize memory recovery, and higher for 64-bit applications to avoid false positives. This dynamic parameter adjustment ensures both effective memory recovery and application continuity.
4Device complexity
If uniform memory threshold is applied to all applications, then implementation is simple, but accuracy of memory leak detection deteriorates
Solution Approach 1:
The patent applies local quality by implementing different memory thresholds for different application types. The system first detects the bitness of each application and then applies the appropriate threshold locally. This approach maintains relatively simple implementation logic (just adding a detection and conditional branch) while significantly improving detection accuracy compared to a uniform threshold approach.
Solution Approach 2:
The patent segments the application population into two categories (32-bit and 64-bit) and applies different memory management policies to each segment. This segmentation allows the system to tailor the memory threshold to the specific characteristics of each group, improving overall detection accuracy while keeping the implementation structure relatively simple through clear categorical division.
Data Source
AI summary
A memory management method and an electronic device are disclosed. The method includes: starting an application and providing virtual memory to the application; checking a space of the virtual memory occupied while the application is running; checking bitness of a process run by the application when the space of the virtual memory occupied is greater than a first threshold; and performing a process-killing operation on the application based on the bitness of the process run by the application. In the foregoing method, a specific application is checked and killed according to a preset policy by combining multi-dimensional information according to occupancy of virtual memory based on a memory exception occurring in a running application, so as to resolve a memory leak problem.


