Skip to content

Page Allocation

include/mem/page_alloc.h View source View on GitHub
void * page_alloc_full(size_t page_count, struct alloc_params params)
source
void * page_alloc_demand_full(
    size_t page_count,
    struct alloc_params params
)
source
void page_free_full(
    void *ptr,
    size_t page_count,
    enum alloc_behavior behavior
)
source
bool page_alloc_vaddr_in_vas(vaddr_t vaddr)
source
void page_alloc_init(void)
source
#define ALLOC_FLAG_EX_PG_CONTIGUOUS ALLOC_FLAG_AVAIL_BIT(0)
source
#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__))
#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__))
#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)
#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))
#define page_free(...)
source
Expansion
#define page_free(...) PP_CALL(page_free, __VA_ARGS__)