Page Allocation
include/mem/page_alloc.h View source View on GitHubFunctions
Section titled “Functions”page_alloc_full
Section titled “page_alloc_full”void * page_alloc_full(size_t page_count, struct alloc_params params) source page_alloc_demand_full
Section titled “page_alloc_demand_full”void * page_alloc_demand_full(
size_t page_count,
struct alloc_params params
) source page_free_full
Section titled “page_free_full”void page_free_full(
void *ptr,
size_t page_count,
enum alloc_behavior behavior
) source page_alloc_vaddr_in_vas
Section titled “page_alloc_vaddr_in_vas”page_alloc_init
Section titled “page_alloc_init”void page_alloc_init(void) source Macros
Section titled “Macros”ALLOC_FLAG_EX_PG_CONTIGUOUS
Section titled “ALLOC_FLAG_EX_PG_CONTIGUOUS”#define ALLOC_FLAG_EX_PG_CONTIGUOUS ALLOC_FLAG_AVAIL_BIT(0) source page_alloc
Section titled “page_alloc”#define page_alloc(page_count, ...) source Expansion
#define page_alloc(page_count, ...) \
page_alloc_full((page_count), alloc_params_with_defaults( \
ALLOC_FLAGS_NONE, ALLOC_BEHAVIOR_NORMAL, \
##__VA_ARGS__)) page_alloc_demand
Section titled “page_alloc_demand”#define page_alloc_demand(page_count, ...) source Expansion
#define page_alloc_demand(page_count, ...) \
page_alloc_demand_full((page_count), \
alloc_params_with_defaults(ALLOC_FLAGS_NONE, \
ALLOC_BEHAVIOR_NORMAL, \
##__VA_ARGS__)) page_free_2
Section titled “page_free_2”#define page_free_2(ptr, page_count) source Expansion
#define page_free_2(ptr, page_count) \
page_free_3((ptr), (page_count), ALLOC_BEHAVIOR_NORMAL) page_free_3
Section titled “page_free_3”#define page_free_3(ptr, page_count, bh) source Expansion
#define page_free_3(ptr, page_count, bh) \
page_free_full((ptr), (page_count), (bh))