diff options
author | Jeremy A. Kolb <[email protected]> | 2019-07-17 15:58:17 +0100 |
---|---|---|
committer | Jeremy A. Kolb <[email protected]> | 2019-07-17 15:58:17 +0100 |
commit | 5e9198f809bb0935e3d2506a8c93597191e1a57c (patch) | |
tree | 328d88c4f7bedae98e5a65f168dcb1febc8b1791 /crates | |
parent | c7ceea82a5ab8aabab2f98e7c1e1ec94e82087c2 (diff) |
jemallocator 0.3
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_prof/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/ra_prof/src/memory_usage.rs | 6 |
2 files changed, 5 insertions, 5 deletions
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" | |||
10 | itertools = "0.8.0" | 10 | itertools = "0.8.0" |
11 | backtrace = "0.3.28" | 11 | backtrace = "0.3.28" |
12 | cpuprofiler = { version = "0.0.3", optional = true } | 12 | cpuprofiler = { version = "0.0.3", optional = true } |
13 | jemallocator = { version = "0.1.9", optional = true } | 13 | jemallocator = { version = "0.3.2", optional = true } |
14 | jemalloc-ctl = { version = "0.2.0", optional = true } | 14 | jemalloc-ctl = { version = "0.3.2", optional = true } |
15 | 15 | ||
16 | 16 | ||
17 | [features] | 17 | [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 { | |||
8 | impl MemoryUsage { | 8 | impl MemoryUsage { |
9 | #[cfg(feature = "jemalloc")] | 9 | #[cfg(feature = "jemalloc")] |
10 | pub fn current() -> MemoryUsage { | 10 | pub fn current() -> MemoryUsage { |
11 | jemalloc_ctl::epoch().unwrap(); | 11 | jemalloc_ctl::epoch::advance().unwrap(); |
12 | MemoryUsage { | 12 | MemoryUsage { |
13 | allocated: Bytes(jemalloc_ctl::stats::allocated().unwrap()), | 13 | allocated: Bytes(jemalloc_ctl::stats::allocated::read().unwrap()), |
14 | resident: Bytes(jemalloc_ctl::stats::resident().unwrap()), | 14 | resident: Bytes(jemalloc_ctl::stats::resident::read().unwrap()), |
15 | } | 15 | } |
16 | } | 16 | } |
17 | 17 | ||