fix: do not use jemalloc on macOS and Windows

This commit is contained in:
sxyazi 2024-02-09 09:41:27 +08:00
parent 25c96557ed
commit 8851269585
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View file

@ -37,6 +37,8 @@ tracing-subscriber = "^0"
[target."cfg(unix)".dependencies]
libc = "^0"
signal-hook-tokio = { version = "^0", features = [ "futures-v0_3" ] }
[target.'cfg(all(not(target_os = "macos"), not(target_os = "windows")))'.dependencies]
tikv-jemallocator = "^0"
[[bin]]

View file

@ -1,7 +1,7 @@
#![allow(clippy::module_inception)]
#![allow(clippy::unit_arg)]
#[cfg(unix)]
#[cfg(all(not(target_os = "macos"), not(target_os = "windows")))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;