pub struct Reserve {
pub bytes: usize,
pub pinned: bool,
pub prefault: bool,
}Expand description
Memory reserved from the operating system before the first allocation.
Fields§
§bytes: usizeBytes to reserve, rounded down to whole ARENA_CHUNK_SIZE chunks. A
reservation below one chunk fails.
pinned: boolPinned memory is mapped by this crate and handed to mimalloc as an
arena that is never purged. Unpinned memory is reserved through
mimalloc and purged like any other arena, unless the kernel granted it
large OS pages. On Linux, both get transparent huge page advice when
Config::transparent_huge_pages allows it.
prefault: boolTouch every page of a pinned reservation up front so first use never faults. Ignored for unpinned reservations.
Implementations§
Trait Implementations§
impl Copy for Reserve
impl Eq for Reserve
impl StructuralPartialEq for Reserve
Auto Trait Implementations§
impl Freeze for Reserve
impl RefUnwindSafe for Reserve
impl Send for Reserve
impl Sync for Reserve
impl Unpin for Reserve
impl UnsafeUnpin for Reserve
impl UnwindSafe for Reserve
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