[−][src]Struct sunrise_bootstrap::frame_alloc::Frame
A pointer to a physical frame
A frame is 4ko in size
Should only be used when paging is off
Fields
physical_addr: usize
is_allocated: bool
Implementations
impl Frame
[src]
pub fn address(&self) -> PhysicalAddress
[src]
Get the physical address of this Frame
pub(super) fn is_allocated(
&self
) -> bool
[src]
&self
) -> bool
Gets the current allocation state
pub fn from_physical_addr(physical_addr: PhysicalAddress) -> Frame
[src]
Constructs a frame structure from a physical address
This does not guaranty that the frame can be written to, or even exists at all
Panic
Panics when the address is not framesize-aligned
pub unsafe fn from_allocated_addr(physical_addr: PhysicalAddress) -> Frame
[src]
Constructs a frame structure from a physical address
This does not guaranty that the frame can be written to, or even exists at all
Panic
Panics when the address is not framesize-aligned
Safety
This function should only be used on physical_addr that are reserved - that is, addresses that the frame allocator will never give. Otherwise, it is unsound.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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>,