pub struct VmMemoryStats { /* private fields */ }Expand description
A sample of VM-owned script memory, measured in bytes.
The logical live total counts object contents; the reserved total includes retained allocation capacity. Rust callback captures, object payloads, and process allocator overhead are outside these totals. Only logical live bytes count toward the script memory limit.
Implementations§
Source§impl VmMemoryStats
impl VmMemoryStats
Sourcepub const fn live_bytes(&self) -> usize
pub const fn live_bytes(&self) -> usize
Returns the current logical live total.
Sourcepub const fn reserved_bytes(&self) -> usize
pub const fn reserved_bytes(&self) -> usize
Returns current reserved allocation capacity.
Sourcepub const fn peak_live_bytes(&self) -> Option<usize>
pub const fn peak_live_bytes(&self) -> Option<usize>
Returns the recorded live peak, or None when tracking is disabled.
Sourcepub const fn peak_reserved_bytes(&self) -> Option<usize>
pub const fn peak_reserved_bytes(&self) -> Option<usize>
Returns the recorded reserved peak, or None when tracking is disabled.
Trait Implementations§
Source§impl Clone for VmMemoryStats
impl Clone for VmMemoryStats
Source§fn clone(&self) -> VmMemoryStats
fn clone(&self) -> VmMemoryStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VmMemoryStats
impl Debug for VmMemoryStats
Source§impl PartialEq for VmMemoryStats
impl PartialEq for VmMemoryStats
impl Copy for VmMemoryStats
impl Eq for VmMemoryStats
impl StructuralPartialEq for VmMemoryStats
Auto Trait Implementations§
impl Freeze for VmMemoryStats
impl RefUnwindSafe for VmMemoryStats
impl Send for VmMemoryStats
impl Sync for VmMemoryStats
impl Unpin for VmMemoryStats
impl UnsafeUnpin for VmMemoryStats
impl UnwindSafe for VmMemoryStats
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