[][src]Module buddy_alloc::buddy_alloc

Buddy alloc, This code heavily references from https://pdos.csail.mit.edu/6.828/2019/lec/malloc.c Check wiki to learn the algorithm: https://en.wikipedia.org/wiki/Buddy_memory_allocation

The idea to to initialize base..end memory to leaf size, then merge them up.

Structs

BuddyAlloc

Constants

LEAF_SIZE

the smallest allocation bytes

Functions

block_size
first_up_k