From 5e9198f809bb0935e3d2506a8c93597191e1a57c Mon Sep 17 00:00:00 2001 From: "Jeremy A. Kolb" Date: Wed, 17 Jul 2019 10:58:17 -0400 Subject: jemallocator 0.3 --- crates/ra_prof/Cargo.toml | 4 ++-- crates/ra_prof/src/memory_usage.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_prof') diff --git a/crates/ra_prof/Cargo.toml b/crates/ra_prof/Cargo.toml index e986019ca..84dcc9813 100644 --- a/crates/ra_prof/Cargo.toml +++ b/crates/ra_prof/Cargo.toml @@ -10,8 +10,8 @@ once_cell = "0.2.0" itertools = "0.8.0" backtrace = "0.3.28" cpuprofiler = { version = "0.0.3", optional = true } -jemallocator = { version = "0.1.9", optional = true } -jemalloc-ctl = { version = "0.2.0", optional = true } +jemallocator = { version = "0.3.2", optional = true } +jemalloc-ctl = { version = "0.3.2", optional = true } [features] diff --git a/crates/ra_prof/src/memory_usage.rs b/crates/ra_prof/src/memory_usage.rs index 7f857942d..8e8cb7299 100644 --- a/crates/ra_prof/src/memory_usage.rs +++ b/crates/ra_prof/src/memory_usage.rs @@ -8,10 +8,10 @@ pub struct MemoryUsage { impl MemoryUsage { #[cfg(feature = "jemalloc")] pub fn current() -> MemoryUsage { - jemalloc_ctl::epoch().unwrap(); + jemalloc_ctl::epoch::advance().unwrap(); MemoryUsage { - allocated: Bytes(jemalloc_ctl::stats::allocated().unwrap()), - resident: Bytes(jemalloc_ctl::stats::resident().unwrap()), + allocated: Bytes(jemalloc_ctl::stats::allocated::read().unwrap()), + resident: Bytes(jemalloc_ctl::stats::resident::read().unwrap()), } } -- cgit v1.2.3