Skip to main content

StoreMemory

Struct StoreMemory 

Source
pub struct StoreMemory {
Show 13 fields pub fixed_bytes: usize, pub slab_bytes: usize, pub boxed_payload_bytes: usize, pub current_table_bytes: usize, pub retired_table_bytes: usize, pub retired_tables: usize, pub retirement_tracking_bytes: usize, pub rehash_scratch_bytes: usize, pub largest_rehash_scratch_bytes: usize, pub strings: StringsMemory, pub has_printer: bool, pub has_draws: bool, pub has_registers: bool,
}
Expand description

A snapshot of known persistent-store storage and explicit accounting gaps.

Allocated slab slots and buffer capacities are measured, including unused slots. Nonempty retired hash tables are counted once while any cached reader retains them. This is a component snapshot, not an atomic process snapshot, a peak-memory measurement or an allocation-time limit.

Known retained bytes exclude allocator rounding/metadata, Arc control blocks, opaque string-index bucket overhead/spare capacity, and externally owned printer names, random streams and registers. Worker arenas, caches and graph buffers belong to their respective owners, not this snapshot. Whole-process RSS accounting remains necessary and is itself sampled, not a hard allocation-time cap.

Fields§

§fixed_bytes: usize

Store object and allocated column/shard/generation/counter arrays.

§slab_bytes: usize

Actual allocated OnceLock slab slots, including unused slots.

§boxed_payload_bytes: usize

Handle slices boxed by large or representation-preserving nodes.

§current_table_bytes: usize

Payload bytes in the current deduplication tables.

§retired_table_bytes: usize

Payload bytes in nonempty old tables still owned by cached readers.

§retired_tables: usize

Number of nonempty old tables still owned by cached readers.

§retirement_tracking_bytes: usize

Allocated retirement-record vector capacity, including unused slots.

§rehash_scratch_bytes: usize

Cumulative temporary Vec<u64> bytes requested by index rehashes. These are allocation traffic, not currently retained bytes.

§largest_rehash_scratch_bytes: usize

Largest individual rehash temporary vector capacity in bytes. This is not a concurrent or whole-store peak; old/new tables overlap it.

§strings: StringsMemory

String-table payload, slot storage and opaque index capacity.

§has_printer: bool

The store retains a shared external printer/name context.

§has_draws: bool

The store retains a shared external random-stream provider.

§has_registers: bool

The store retains a shared external register provider.

Implementations§

Source§

impl StoreMemory

Source

pub fn known_retained_bytes(self) -> Option<usize>

A lower bound on retained bytes of the measured components, or None on arithmetic overflow. Rehash traffic is excluded; gaps are documented on StoreMemory. This must not be used as a complete memory budget.

Trait Implementations§

Source§

impl Clone for StoreMemory

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StoreMemory

Source§

impl Debug for StoreMemory

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StoreMemory

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for StoreMemory

Source§

impl PartialEq for StoreMemory

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for StoreMemory

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.