Physical memory manager
include/mem/pmm.h View source View on GitHubFunctions
Section titled “Functions”pmm_alloc_page_internal
Section titled “pmm_alloc_page_internal”paddr_t pmm_alloc_page_internal(enum alloc_flags flags); pmm_alloc_pages_internal
Section titled “pmm_alloc_pages_internal”paddr_t pmm_alloc_pages_internal(size_t count, enum alloc_flags flags); pmm_free_pages
Section titled “pmm_free_pages”void pmm_free_pages(paddr_t addr, uint64_t count); pmm_free_page
Section titled “pmm_free_page”void pmm_free_page(paddr_t addr); pmm_early_init
Section titled “pmm_early_init”void pmm_early_init(struct limine_memmap_request m); pmm_mid_init
Section titled “pmm_mid_init”void pmm_mid_init(void); pmm_late_init
Section titled “pmm_late_init”void pmm_late_init(void); pmm_get_usable_ram
Section titled “pmm_get_usable_ram”uint64_t pmm_get_usable_ram(void); Variables
Section titled “Variables”memmap
Section titled “memmap”extern struct limine_memmap_response *memmap; Macros
Section titled “Macros”pmm_alloc_pages_1
Section titled “pmm_alloc_pages_1”#define pmm_alloc_pages_1(count) \
({ \
if ((enum alloc_flags) count == ALLOC_FLAGS_DEFAULT) \
log_warn_once("Input to alloc_pages matches ALLOC_FLAGS_DEFAULT, " \
"possible mistake"); \
\
pmm_alloc_pages_internal(count, ALLOC_FLAGS_DEFAULT); \
}) pmm_alloc_pages_2
Section titled “pmm_alloc_pages_2”#define pmm_alloc_pages_2(count, f) pmm_alloc_pages_internal((count), (f)); pmm_alloc_pages
Section titled “pmm_alloc_pages”#define pmm_alloc_pages(...) \
_DISPATCH(pmm_alloc_pages, PP_NARG(__VA_ARGS__))(__VA_ARGS__) pmm_alloc_page_0
Section titled “pmm_alloc_page_0”#define pmm_alloc_page_0() pmm_alloc_page_internal((ALLOC_FLAGS_DEFAULT)) pmm_alloc_page_1
Section titled “pmm_alloc_page_1”#define pmm_alloc_page_1(f) pmm_alloc_page_internal((f)) pmm_alloc_page
Section titled “pmm_alloc_page”#define pmm_alloc_page(...) \
_DISPATCH(pmm_alloc_page, PP_NARG(__VA_ARGS__))(__VA_ARGS__)