ptos: mm: Add page allocation helpers

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
2026-07-12 22:26:59 +00:00
parent f543f28bf0
commit 048c479cd7
2 changed files with 29 additions and 0 deletions
+12
View File
@@ -45,6 +45,10 @@ typedef struct {
USIZE Length;
} MM_RANGE;
/* Obtain a pointer from an &MM_RANGE pointer */
#define RANGE_PTR(RANGE_P) \
((VOID *)((RANGE_P)->VirtualBase))
/*
* Unmap a virtual memory range
*
@@ -67,6 +71,14 @@ PT_STATUS MmMapRange(
MM_PROT Prot, MMU_PAGESIZE PageSize
);
/*
* Allocate one or more pages
*
* @Count: Number of pages to allocate
* @Result: Result is written back here
*/
PT_STATUS MmAllocatePages(USIZE Count, MM_RANGE *Result);
/*
* Initialize virtual memory
*/