Dynamic Memory Block Type Adjustment for Fragmentation Control
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Memory fragmentation issues arise when unmovable memory partitions borrow memory blocks from reclaimable and/or movable partitions, leading to inefficient memory compaction and excessive occupation, which hampers working efficiency and fails to effectively alleviate fragmentation during compaction.
Innovation Solution
A memory block type processing method that monitors and adjusts the types of memory blocks, ensuring sufficient regional ranges of reclaimable and movable types by converting memory blocks back to their original types if they exceed a preset capacity threshold, thereby preventing capacity reduction and facilitating continuous memory compaction.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If unmovable memory partitions borrow memory blocks from reclaimable and/or movable partitions, then the available memory for unmovable partitions is increased, but the regional range of reclaimable and/or movable partitions is reduced, leading to insufficient memory for effective compaction
Solution Approach 1:
The patent implements dynamic type conversion of memory blocks based on real-time system conditions. Memory blocks can be converted between unmovable, movable, and reclaimable types according to the regional range thresholds and compaction needs, making the memory partitioning system flexible and adaptive rather than static
Solution Approach 2:
The system changes the type parameter of memory blocks based on detected regional ranges. When the regional range of reclaimable/movable partitions exceeds a threshold, blocks are converted to unmovable type; when it falls below the threshold, blocks are converted back to movable or reclaimable types, optimizing the balance between available capacity and compaction efficiency
2Quantity of substance
If memory blocks are converted to unmovable type to increase available capacity, then the memory capacity for unmovable partitions is improved, but the ability to perform memory compaction is lost
Solution Approach 1:
The system performs preliminary detection of the regional range of reclaimable and movable memory blocks before converting memory block types. This preliminary action ensures that type conversion only occurs when it will not compromise future compaction operations, preventing the loss of compaction capability while still increasing available capacity
3Productivity
If the regional range of reclaimable and/or movable partitions is kept large to ensure compaction capability, then memory compaction efficiency is improved, but the available memory capacity for unmovable partitions is reduced
Solution Approach 1:
The system continuously monitors the regional range of reclaimable and movable memory blocks and uses this feedback to dynamically adjust memory block type conversions. When the regional range exceeds the preset threshold, the system converts blocks to unmovable type; when it falls below the threshold, blocks are converted back, creating a feedback loop that optimizes both capacity and compaction efficiency
Data Source
Figure 1
Figure 2
Figure 3~4
AI summary
A memory block type processing method and device, an electronic device and a readable storage medium are provided. A memory of the electronic device includes multiple memory blocks of a movable type, multiple memory blocks of a reclaimable type and multiple memory blocks of an unmovable type. The method includes: a state of each memory block in the electronic device is monitored (S 110); when it is monitored that a memory block is released, a type of the released memory block is detected (S 120); responsive to detecting that an original type of the released memory block is inconsistent with a present type of the released memory block, a released memory capacity of the released memory block is detected (S 130); and adjusting the present type of the released memory block according to the detected released memory capacity (S140). Therefore, sufficient regional ranges of memory partitions of the reclaimable and/or movable types can be ensured, and during memory compaction, a continuous memory that is sufficient for a user to use can be effectively provided by compaction to alleviate the memory fragmentation problem.