diff --git a/Cargo.toml b/Cargo.toml index 91dab9a..29d6ce7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ bit-vec = "0.6" bitvec = "1" pbr = "*" -[target.'cfg(not(target_env = "msvc"))'.dependencies] +[target.'cfg(target_os="linux")'.dependencies] tikv-jemallocator = "0.5" [dev-dependencies] diff --git a/src/main.rs b/src/main.rs index d102d77..06355a2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,12 +18,9 @@ use std::collections::HashMap; use std::time::SystemTime; -#[cfg(not(target_env = "msvc"))] -use tikv_jemallocator::Jemalloc; - -#[cfg(not(target_env = "msvc"))] +#[cfg(target_os = "linux")] #[global_allocator] -static GLOBAL: Jemalloc = Jemalloc; +static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; fn main() { let now = SystemTime::now();