Files
moss-kernel/src/memory/page.rs
Matthew Leach 54f2d683b8 libkernel: move ClaimedPage into libkernel crate
By moving `ClaimedPage` into libkernel we can utilise it in
arch-agonstic ode.
2025-12-17 20:04:31 -08:00

17 lines
512 B
Rust

use super::{PAGE_ALLOC, PageOffsetTranslator};
use crate::arch::ArchImpl;
use libkernel::memory::page_alloc::PageAllocGetter;
pub struct PgAllocGetter {}
impl PageAllocGetter<ArchImpl> for PgAllocGetter {
fn global_page_alloc() -> &'static libkernel::sync::once_lock::OnceLock<
libkernel::memory::page_alloc::FrameAllocator<ArchImpl>,
ArchImpl,
> {
&PAGE_ALLOC
}
}
pub type ClaimedPage = libkernel::memory::page::ClaimedPage<ArchImpl, PgAllocGetter, PageOffsetTranslator>;