PatchworkOS
Loading...
Searching...
No Matches
pmm.h File Reference
#include <boot/boot_info.h>

Go to the source code of this file.

Functions

void pmm_init (const boot_memory_map_t *map)
 Initializes the Physical Memory Manager.
 
void * pmm_alloc (void)
 Allocates a single physical page.
 
uint64_t pmm_alloc_pages (void **addresses, uint64_t count)
 Allocates multiple physical pages.
 
void * pmm_alloc_bitmap (uint64_t count, uintptr_t maxAddr, uint64_t alignment)
 Allocates a contiguous region of physical pages managed by the bitmap.
 
void pmm_free (void *address)
 Frees a single physical page.
 
void pmm_free_pages (void **addresses, uint64_t count)
 Frees multiple physical pages.
 
void pmm_free_region (void *address, uint64_t count)
 Frees a contiguous region of physical pages.
 
uint64_t pmm_total_amount (void)
 Retrieves the total amount of physical memory managed by the PMM.
 
uint64_t pmm_free_amount (void)
 Retrieves the amount of free physical memory.
 
uint64_t pmm_reserved_amount (void)
 Retrieves the amount of reserved physical memory.