pub struct FBufSlabs { /* private fields */ }Expand description
Power-of-two free lists for recycling FBuf allocations.
Implementations§
Source§impl FBufSlabs
impl FBufSlabs
Sourcepub const HIGHEST_SLAB_CLASS_CAPACITY: usize
pub const HIGHEST_SLAB_CLASS_CAPACITY: usize
Largest allocation capacity that maps to a dedicated slab size class. Requests above this bypass slab reuse and fall back to malloc/free.
Sourcepub const DEFAULT_BYTES_PER_CLASS: usize
pub const DEFAULT_BYTES_PER_CLASS: usize
Default byte budget retained per slab size class when callers do not supply an explicit setting.
Sourcepub fn backend_id(&self) -> usize
pub fn backend_id(&self) -> usize
Returns a stable identifier for this slab allocator instance.
Sourcepub fn new(bytes_per_class: usize) -> Self
pub fn new(bytes_per_class: usize) -> Self
Creates a new slab set with a fixed byte budget per size class.
The effective cached buffer count for each class is
max(bytes_per_class, class_size) / class_size, which guarantees that
every slab class can cache at least one buffer.
Sourcepub fn stats(&self) -> FBufSlabsStats
pub fn stats(&self) -> FBufSlabsStats
Returns a snapshot of slab occupancy and request counters for this slab set.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FBufSlabs
impl Forget for FBufSlabs
impl Move for FBufSlabs
impl RefUnwindSafe for FBufSlabs
impl Send for FBufSlabs
impl Sync for FBufSlabs
impl Unpin for FBufSlabs
impl UnsafeUnpin for FBufSlabs
impl UnwindSafe for FBufSlabs
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.