mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
parent
f2c64ba15d
commit
fc9c2915c7
3 changed files with 22 additions and 20 deletions
|
@ -8,7 +8,7 @@ pub struct MemoryUsage {
|
|||
}
|
||||
|
||||
impl MemoryUsage {
|
||||
#[cfg(feature = "jemalloc")]
|
||||
#[cfg(all(feature = "jemalloc", not(target_env = "msvc")))]
|
||||
pub fn current() -> MemoryUsage {
|
||||
jemalloc_ctl::epoch::advance().unwrap();
|
||||
MemoryUsage {
|
||||
|
@ -17,7 +17,7 @@ impl MemoryUsage {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "jemalloc"))]
|
||||
#[cfg(any(not(feature = "jemalloc"), target_env = "msvc"))]
|
||||
pub fn current() -> MemoryUsage {
|
||||
MemoryUsage { allocated: Bytes(0), resident: Bytes(0) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue