pub struct BitmapFrameAlloc {
    bitmap: [u64; 256],
    base: u64,
}Expand description
Minimal bitmap-based PMM for 4K frames in a fixed region.
This type manages a fixed region of physical memory, tracking free/used 4K frames using a bitmap. It supports allocation and freeing, but does not require a heap.
§Example
use kernel_alloc::frame_alloc::BitmapFrameAlloc;
use kernel_vmem::FrameAlloc;
let mut pmm = BitmapFrameAlloc::new();
let frame = pmm.alloc_4k();
if let Some(pa) = frame {
    // Use the physical address...
    pmm.free_4k(pa);
}§Safety
- Only physical addresses within the managed region are tracked.
 - The user must ensure that reserved/used frames (e.g., kernel, bootloader) are marked as used before allocation.
 - No synchronization is provided; not thread-safe.
 
Fields§
§bitmap: [u64; 256]§base: u64Implementations§
Source§impl BitmapFrameAlloc
 
impl BitmapFrameAlloc
Trait Implementations§
Source§impl Default for BitmapFrameAlloc
 
impl Default for BitmapFrameAlloc
Source§impl FrameAlloc for BitmapFrameAlloc
 
impl FrameAlloc for BitmapFrameAlloc
Auto Trait Implementations§
impl Freeze for BitmapFrameAlloc
impl RefUnwindSafe for BitmapFrameAlloc
impl Send for BitmapFrameAlloc
impl Sync for BitmapFrameAlloc
impl Unpin for BitmapFrameAlloc
impl UnwindSafe for BitmapFrameAlloc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more