[−][src]Struct sunrise_bootstrap::frame_alloc::FrameAllocator
A physical memory manger to allocate and free memory frames
Implementations
impl FrameAllocator
[src]
pub fn init(boot_info: &BootInformation)
[src]
Initialize the FrameAllocator by parsing the multiboot information and marking some memory areas as unusable
fn check_initialized(bitmap: &AllocatorBitmap)
[src]
Panics if the frames bitmap was not initialized
fn mark_area_reserved(bitmap: &mut [u8], start_addr: usize, end_addr: usize)
[src]
Marks a physical memory area as reserved and will never give it when requesting a frame. This is used to mark where memory holes are, or where the kernel was mapped
Panic
Does not panic if it overwrites an existing reservation
fn mark_area_free(bitmap: &mut [u8], start_addr: usize, end_addr: usize)
[src]
Marks a physical memory area as free for frame allocation
Panic
Does not panic if it overwrites an existing reservation
pub fn alloc_frame() -> Frame
[src]
Allocates a free frame
Panic
Panics if it cannot find a free frame. This is fine for now when we have plenty of memory and should not happen, but in the future we should return an Error type
pub fn alloc_contiguous_frames(count: usize) -> PhysicalAddress
[src]
fn free_frame(frame: &Frame)
[src]
Auto Trait Implementations
impl RefUnwindSafe for FrameAllocator
impl Send for FrameAllocator
impl Sync for FrameAllocator
impl Unpin for FrameAllocator
impl UnwindSafe for FrameAllocator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,