Modified Buddy System Memory Allocator Reducing Fragmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional buddy system memory allocators suffer from significant external memory fragmentation, leading to a lack of contiguous memory blocks that can satisfy larger memory requests, resulting in memory pressure and inefficiency.
Innovation Solution
A modified buddy system memory allocator that organizes memory blocks into multiple free block lists and uses a combination of contiguous, differently-sized blocks to satisfy memory requests, allowing for better memory utilization and reduced fragmentation by allocating and coalescing memory blocks without strict alignment requirements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If the buddy system memory allocator uses strict alignment requirements and equal-sized buddy blocks, then memory management is simplified and coalescence is easier, but external memory fragmentation increases and larger memory requests cannot be satisfied
Solution Approach 1:
The patent segments the memory allocation process into two distinct phases: allocation phase that uses traditional buddy system with strict alignment, and coalescence phase that relaxes alignment requirements. This segmentation allows the system to maintain simple management during allocation while enabling flexible coalescence of non-aligned blocks to reduce external fragmentation and satisfy larger memory requests.
Solution Approach 2:
The patent introduces dynamic alignment requirements for coalesced blocks. Instead of fixed alignment rules, the system dynamically determines alignment based on the sum of buddy block sizes. When coalescing blocks, the alignment requirement adapts to match the total size of the coalesced region, enabling flexible memory consolidation while maintaining memory management integrity.
2Adaptability or versatility
If the buddy system memory allocator divides large memory blocks into smaller equal-sized blocks, then small memory requests can be satisfied, but external memory fragmentation increases
Solution Approach 1:
The patent implements a coalescence mechanism that merges adjacent buddy blocks into larger contiguous memory regions. When buddy blocks become available through deallocation, the system combines them with adjacent available blocks to form larger contiguous regions, thereby reducing external fragmentation and making larger memory requests satisfiable without requiring strict alignment between the original small blocks.
3Ease of operation
If the buddy system memory allocator requires coalesced blocks to be aligned to power-of-2 boundaries, then memory management is simpler, but memory utilization decreases
Solution Approach 1:
The patent makes alignment requirements dynamic rather than static. Instead of always requiring power-of-2 alignment, the system adjusts alignment requirements based on the actual size of coalesced memory regions. This dynamic approach allows coalescence of blocks that would otherwise be misaligned, improving memory utilization while keeping the coalescence operation manageable through automated size-based alignment determination.
Data Source
AI summary
A modified buddy system memory allocator of an apparatus in an example receives a request for a size of memory. The modified buddy system memory allocator identifies a plurality of contiguous, differently-sized memory blocks that are each smaller than the size of memory from the request. The modified buddy system memory allocator allocates the plurality of contiguous, differently-sized memory blocks to satisfy the request for the size of memory.


