memory/
statistics.rs

1#[derive(Debug, Clone)]
2pub struct RegionStatistics {
3    /// Total usable size of the heap region in bytes.
4    pub size: usize,
5
6    /// Currently used size of the heap region in bytes.
7    pub used: usize,
8
9    /// Free size of the heap region in bytes.
10    pub free: usize,
11}
12
13#[derive(Debug)]
14pub struct Statistics {
15    /// Granular stats for all the configured memory regions.
16    pub region_stats: [Option<RegionStatistics>; 3],
17
18    /// Total size of all combined heap regions in bytes.
19    pub size: usize,
20
21    /// Current usage of the heap across all configured regions in bytes.
22    pub current_usage: usize,
23
24    /// Estimation of the max used heap in bytes.
25    #[cfg(feature = "Debug")]
26    pub max_usage: usize,
27
28    /// Estimation of the total allocated bytes since initialization.
29    #[cfg(feature = "Debug")]
30    pub total_allocated: usize,
31
32    /// Estimation of the total freed bytes since initialization.
33    #[cfg(feature = "Debug")]
34    pub total_freed: usize,
35}