pub struct JemallocStats {
pub allocated_bytes: u64,
pub active_bytes: u64,
pub metadata_bytes: u64,
pub resident_bytes: u64,
pub mapped_bytes: u64,
pub retained_bytes: u64,
}Expand description
Snapshot of jemalloc’s process-wide accounting at one tick. All
values are bytes. Definitions match the stats.* mallctl namespace
(see jemalloc(3)).
Fields§
§allocated_bytes: u64Bytes currently held by live application allocations
(stats.allocated). The closest thing to “what is the live heap
from the program’s point of view”. If this grows monotonically
across runs while caches stay flat, the program is holding more
memory.
active_bytes: u64Bytes in active jemalloc extents (stats.active). Always
>= allocated_bytes; the delta is fragmentation within active
extents.
metadata_bytes: u64Bytes used by jemalloc’s own metadata structures
(stats.metadata).
resident_bytes: u64jemalloc’s resident-set estimate (stats.resident): active +
retained-but-resident + metadata, in pages.
mapped_bytes: u64Total virtual memory mapped by jemalloc (stats.mapped).
retained_bytes: u64Virtual memory retained by jemalloc after decommit
(stats.retained). This is the bucket that explains “process
RSS stays high after a workload finishes” — pages were
returned to jemalloc but jemalloc has not yet returned them to
the kernel. Controlled by dirty_decay_ms / muzzy_decay_ms
in MALLOC_CONF.
Trait Implementations§
Source§impl Clone for JemallocStats
impl Clone for JemallocStats
Source§fn clone(&self) -> JemallocStats
fn clone(&self) -> JemallocStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more