Enum memory::AllocationRequest
pub enum AllocationRequest<'r> {
AtVirtualAddress(VirtualAddress),
AlignedTo {
alignment_4k_pages: usize,
},
WithinRange(&'r PageRange<Page4K>),
Any,
}
Expand description
Possible options when requesting pages from the page allocator.
Variants§
AtVirtualAddress(VirtualAddress)
The allocated pages must start exactly at the given VirtualAddress
.
AlignedTo
The allocated pages may be located at any virtual address,
but the starting page must be aligned to a multiple of alignment_4k_pages
.
An alignment of 1
page is equivalent to specifying no alignment requirement.
Note: alignment is specified in number of 4KiB pages, not number of bytes.
WithinRange(&'r PageRange<Page4K>)
The allocated pages can be located anywhere within the given range.
Any
The allocated pages can be located at any virtual address and have no special alignment requirements beyond a single page.
Auto Trait Implementations§
impl<'r> RefUnwindSafe for AllocationRequest<'r>
impl<'r> Send for AllocationRequest<'r>
impl<'r> Sync for AllocationRequest<'r>
impl<'r> Unpin for AllocationRequest<'r>
impl<'r> UnwindSafe for AllocationRequest<'r>
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