Get the current allocation statistics
()
| 51 | |
| 52 | /// Get the current allocation statistics |
| 53 | pub fn stats() -> AllocationStats { |
| 54 | AllocationStats { |
| 55 | allocations: ALLOCATIONS.load(Ordering::Relaxed), |
| 56 | deallocations: DEALLOCATIONS.load(Ordering::Relaxed), |
| 57 | bytes_allocated: BYTES_ALLOCATED.load(Ordering::Relaxed), |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | #[derive(Debug, Clone)] |