Skip to content
class

MemoryStats

MemoryStats

Plain-data snapshot of one device's allocation counters.

Returned by MemoryTracker::get_stats. Copying is trivial — the struct is a value-typed snapshot and not connected to the live atomic counters once returned.

Attributes

current_bytesstd::size_t
Bytes currently held by the allocator on this device (lifetime allocated minus lifetime freed).
peak_bytesstd::size_t
High-water mark of current_bytes since process start or the last MemoryTracker::reset_peak call.
alloc_countstd::size_t
Lifetime total of successful allocation events.
free_countstd::size_t
Lifetime total of deallocation events.