From dae99b66611759ba48fd164646f077d3e8515dad Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 09:45:20 +0200 Subject: Drop resident from memory usage --- crates/ra_prof/src/memory_usage.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates') diff --git a/crates/ra_prof/src/memory_usage.rs b/crates/ra_prof/src/memory_usage.rs index 745345fac..857b51321 100644 --- a/crates/ra_prof/src/memory_usage.rs +++ b/crates/ra_prof/src/memory_usage.rs @@ -5,7 +5,6 @@ use cfg_if::cfg_if; pub struct MemoryUsage { pub allocated: Bytes, - pub resident: Bytes, } impl MemoryUsage { @@ -14,9 +13,9 @@ impl MemoryUsage { if #[cfg(target_os = "linux")] { // Note: This is incredibly slow. let alloc = unsafe { libc::mallinfo() }.uordblks as u32 as usize; - MemoryUsage { allocated: Bytes(alloc), resident: Bytes(0) } + MemoryUsage { allocated: Bytes(alloc) } } else { - MemoryUsage { allocated: Bytes(0), resident: Bytes(0) } + MemoryUsage { allocated: Bytes(0) } } } } @@ -24,7 +23,7 @@ impl MemoryUsage { impl fmt::Display for MemoryUsage { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - write!(fmt, "{} allocated {} resident", self.allocated, self.resident,) + write!(fmt, "{}", self.allocated) } } -- cgit v1.2.3