Even if jemalloc feature is used do not use it on msvc

Fixes #2233
This commit is contained in:
kjeremy 2019-11-14 11:47:18 -05:00
parent f2c64ba15d
commit fc9c2915c7
3 changed files with 22 additions and 20 deletions

View file

@ -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) }
}