Module buddy_alloc::buddy_alloc
source · Expand description
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
Constants
- required align to 16 bytes, since Node takes 16 bytes on 64-bits machine.