pub struct BytesTracker(/* private fields */);Available on crate feature
tracker only.Expand description
Shared counter of the memory held by buffer allocations.
An allocation attributed to a tracker charges its size, including the allocation header, until the allocation is freed or returned to the page cache. The tracker state lives while any handle or attributed allocation exists, so a handle can outlive the buffers and the buffers can outlive all handles.
Implementations§
Source§impl BytesTracker
impl BytesTracker
Sourcepub fn snapshot(&self) -> BytesTrackerSnapshot
pub fn snapshot(&self) -> BytesTrackerSnapshot
Returns the current values of the tracker.
Sourcepub fn ptr_eq(&self, other: &BytesTracker) -> bool
pub fn ptr_eq(&self, other: &BytesTracker) -> bool
Returns true if both handles refer to the same tracker.
Trait Implementations§
Source§impl Clone for BytesTracker
impl Clone for BytesTracker
Source§impl Debug for BytesTracker
impl Debug for BytesTracker
Source§impl Default for BytesTracker
impl Default for BytesTracker
Source§impl Drop for BytesTracker
impl Drop for BytesTracker
impl Send for BytesTracker
impl Sync for BytesTracker
Auto Trait Implementations§
impl Freeze for BytesTracker
impl RefUnwindSafe for BytesTracker
impl Unpin for BytesTracker
impl UnsafeUnpin for BytesTracker
impl UnwindSafe for BytesTracker
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