Skip to main content

global_allocated_bytes

Function global_allocated_bytes 

Source
pub fn global_allocated_bytes() -> Option<usize>
Expand description

Total bytes ever allocated through the CountingAlloc global allocator.

Returns None when the runtime was not built with feature = "memory_monitoring" (no counting allocator installed). Returns Some(_) otherwise.

Counters are monotonic and saturate at usize::MAX; subtract two snapshots to get a delta over a window.