proc_status/mem_usage.rs
1
2
3/// information about the physical RAM usage of a process
4///
5/// Note that the data, while given in bytes for simplicity,
6/// isn't that precise:
7/// - the numbers are truncated when written by the OS
8/// - the proc_info crate own mem usage isn't 0
9#[derive(Debug, Clone, Copy)]
10pub struct MemUsage {
11
12 /// estimation of the current physical memory used by the
13 /// application, in bytes.
14 ///
15 /// Comes from proc/<id>/status/VmRSS
16 pub current: usize,
17
18 /// estimation of the peak physical memory used by the
19 /// application, in bytes.
20 ///
21 /// Comes from proc/<id>/status/VmHWM
22 pub peak: usize,
23
24}