Skip to content
class

Counters

Counters

Live atomic counters for a single device.

One instance is held in static storage per Device. Not intended for direct use by application code — interact via the static MemoryTracker methods instead.

Attributes

current_bytesstd::atomic<std::size_t>
Bytes currently held by the allocator on this device.
peak_bytesstd::atomic<std::size_t>
Monotonically non-decreasing high-water mark of current_bytes since the last reset_peak.
alloc_countstd::atomic<std::size_t>
Number of successful allocation events.
free_countstd::atomic<std::size_t>
Number of deallocation events.