Memory Allocation Method Reducing Fragmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing memory allocation methods in electronic devices lead to memory fragmentation due to the mixed use of memory blocks of different sizes, resulting in inefficiencies and increased power consumption when large continuous memory blocks are required.

Innovation Solution

The method involves managing memory blocks of different sizes separately by allocating memory from specific regions based on preset capacity ranges, ensuring that memory blocks are allocated from the appropriate region to minimize fragmentation, using a device with a configuration module, comparison module, and allocation module to manage memory blocks effectively.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If memory blocks of different sizes are allocated from the entire memory without distinction, then memory allocation is simple and fast, but memory fragmentation occurs and large continuous memory blocks cannot be obtained

Engineering Contradiction:
Improvememory allocation efficiencyVSAvoidmemory continuity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent divides the entire memory into multiple memory regions, where each region is dedicated to storing memory blocks of a specific size range. This segmentation allows the system to efficiently allocate memory blocks of different sizes while maintaining large continuous memory blocks in dedicated regions, thereby preventing fragmentation and ensuring both allocation efficiency and memory continuity.

Inventive Principle:
Principle #1Segmentation

2Volume of stationary object

If memory compaction is performed to obtain large continuous storage space, then large capacity memory blocks are obtained, but user operations are affected and additional power consumption is caused

Engineering Contradiction:
Improvecontinuous storage spaceVSAvoidpower consumption
Core Design Contradiction:
Volume of stationary objectVSLoss of energy

Solution Approach 1:

The patent performs preliminary action by pre-dividing memory into regions dedicated to different size ranges before allocation occurs. This ensures that large continuous memory blocks are already available in the large-block memory region when needed, eliminating the need for power-consuming memory compaction operations and avoiding disruption to user operations.

Inventive Principle:
Principle #10Preliminary action

3Device complexity

If memory blocks are allocated without size distinction, then allocation process is simple, but idle memory blocks cannot meet requirements for large-capacity memory allocation

Engineering Contradiction:
Improveallocation process complexityVSAvoidavailable large-capacity memory
Core Design Contradiction:
Device complexityVSQuantity of substance

Solution Approach 1:

The patent applies local quality by assigning different characteristics to different memory regions. Each memory region is optimized for specific size ranges, with large-block memory regions maintaining large continuous blocks for large-capacity allocations, while small-block regions handle smaller allocations. This localized optimization ensures sufficient large-capacity memory availability without overly complicating the overall allocation process.

Inventive Principle:
Principle #3Local quality

Data Source

PatentEP3633515B1Memory allocation method, apparatus, electronic device, and computer storage medium
Publication Date: 2022.09.07 ONEPLUS TECH SHENZHEN
  • EP3633515B1 patent drawingFigure 1
  • EP3633515B1 patent drawingFigure 2
  • EP3633515B1 patent drawingFigure 3

AI summary

Provided in the embodiments of the present invention are a memory allocation method, apparatus, electronic device, and computer storage medium. The memory of the electronic device comprises a first internal memory region and a second internal memory region. The method comprises: receiving a memory allocation request, said the memory allocation request comprising memory capacity needing to be allocated; comparing the memory capacity that needs to be allocated with the capacity range of a preset memory block to obtain a comparison result; according to the comparison result, allocating a corresponding capacity from the first memory region or the second memory region.