Enum profile_traits::mem::ReportKind
source · pub enum ReportKind {
ExplicitJemallocHeapSize,
ExplicitSystemHeapSize,
ExplicitNonHeapSize,
ExplicitUnknownLocationSize,
NonExplicitSize,
}
Expand description
The various kinds of memory measurement.
Here “explicit” means explicit memory allocations done by the application. It includes allocations made at the OS level (via functions such as VirtualAlloc, vm_allocate, and mmap), allocations made at the heap allocation level (via functions such as malloc, calloc, realloc, memalign, operator new, and operator new[]) and where possible, the overhead of the heap allocator itself. It excludes memory that is mapped implicitly such as code and data segments, and thread stacks. “explicit” is not guaranteed to cover every explicit allocation, but it does cover most (including the entire heap), and therefore it is the single best number to focus on when trying to reduce memory usage.
Variants§
ExplicitJemallocHeapSize
A size measurement for an explicit allocation on the jemalloc heap. This should be used
for any measurements done via the MallocSizeOf
trait.
ExplicitSystemHeapSize
A size measurement for an explicit allocation on the system heap. Only likely to be used for external C or C++ libraries that don’t use jemalloc.
ExplicitNonHeapSize
A size measurement for an explicit allocation not on the heap, e.g. via mmap().
ExplicitUnknownLocationSize
A size measurement for an explicit allocation whose location is unknown or uncertain.
NonExplicitSize
A size measurement for a non-explicit allocation. This kind is used for global measurements such as “resident” and “vsize”, and also for measurements that cross-cut the measurements grouped under “explicit”, e.g. by grouping those measurements in a way that’s different to how they are grouped under “explicit”.
Trait Implementations§
source§impl Debug for ReportKind
impl Debug for ReportKind
source§impl<'de> Deserialize<'de> for ReportKind
impl<'de> Deserialize<'de> for ReportKind
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ReportKind
impl RefUnwindSafe for ReportKind
impl Send for ReportKind
impl Sync for ReportKind
impl Unpin for ReportKind
impl UnwindSafe for ReportKind
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
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