Expand description
Buddy allocator for physical page allocation (ADR-136).
A no_std, no_alloc buddy allocator that uses a fixed-size bitmap
to track allocation state. Each bit in the bitmap represents a block
at its corresponding order level. The allocator manages blocks in
power-of-two sizes (in pages).
§Design
The allocator uses a single flat bitmap where each order level owns
a contiguous range of bits. For order k, there are total_pages / 2^k
blocks. A set bit means the block is free.
Block splitting and merging (buddy coalescing) are performed during
alloc_pages and free_pages respectively.
Structs§
- Buddy
Allocator - A buddy allocator managing
TOTAL_PAGESof physical memory.