Buddy allocator
include/mem/buddy.h View source View on GitHubStructs
Section titled “Structs”buddy_free_area
Section titled “buddy_free_area” struct buddy_free_area (3 fields) source
§
struct buddy_page *head head->prev == NULL
§
struct buddy_page *tail tail->next == NULL
§
uint64_t nr_free Functions
Section titled “Functions”buddy_add_to_free_area
Section titled “buddy_add_to_free_area”void buddy_add_to_free_area(
struct buddy_page *page,
struct buddy_free_area *area
) source buddy_remove_from_free_area
Section titled “buddy_remove_from_free_area”struct buddy_page * buddy_remove_from_free_area(struct buddy_free_area *area) source buddy_alloc_pages_global
Section titled “buddy_alloc_pages_global”paddr_t buddy_alloc_pages_global(size_t count, enum alloc_flags flags) source buddy_free_pages_global
Section titled “buddy_free_pages_global”buddy_add_entry
Section titled “buddy_add_entry”void buddy_add_entry(
struct page *page_array,
struct limine_memmap_entry *entry,
struct buddy_free_area *farea
) source buddy_reserve_range
Section titled “buddy_reserve_range”void buddy_reserve_range(uint64_t pfn, uint64_t pages) source buddy_alloc_pages
Section titled “buddy_alloc_pages”paddr_t buddy_alloc_pages(
struct buddy_free_area *free_area,
size_t count
) source buddy_free_pages
Section titled “buddy_free_pages”void buddy_free_pages(
paddr_t addr,
size_t count,
struct buddy_free_area *free_area,
size_t total_pages
) source buddy_init
Section titled “buddy_init”void buddy_init(void) source Macros
Section titled “Macros”BUDDY_MAX_ORDER
Section titled “BUDDY_MAX_ORDER”#define BUDDY_MAX_ORDER 18 source