pub struct SlicedPool {
pub page_size: u64,
pub pages: Option<u64>,
pub max_slice: Option<u64>,
}Expand description
One pool of a MemoryPoolLayout::Sliced layout: allocations are slices of
fixed-size pages, capped at pages pages. An allocation that no longer fits
goes to the next pool that accepts it, and fails when none does.
Sizes are rounded up to the device’s alignment, so a pool holds at least
what it was asked for. A layout that cannot be honoured at all — a zero
size, max_slice past page_size, pages outside 1..=65535 — is refused
with InvalidLayout.
Fields§
§page_size: u64Size of each page in bytes; also the largest single allocation this pool can serve. Rounded up to the device’s alignment.
pages: Option<u64>How many pages the pool may hold. None grows without a cap, which is
what a workload is measured on before its caps are known.
max_slice: Option<u64>Largest allocation routed to this pool; None accepts anything up to
page_size. Later pools see only what this one declines.
Trait Implementations§
Source§impl Clone for SlicedPool
impl Clone for SlicedPool
Source§fn clone(&self) -> SlicedPool
fn clone(&self) -> SlicedPool
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SlicedPool
Source§impl Debug for SlicedPool
impl Debug for SlicedPool
impl Eq for SlicedPool
Source§impl PartialEq for SlicedPool
impl PartialEq for SlicedPool
impl StructuralPartialEq for SlicedPool
Auto Trait Implementations§
impl Freeze for SlicedPool
impl RefUnwindSafe for SlicedPool
impl Send for SlicedPool
impl Sync for SlicedPool
impl Unpin for SlicedPool
impl UnsafeUnpin for SlicedPool
impl UnwindSafe for SlicedPool
Blanket Implementations§
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more