Disable jemalloc on macOS

This is a workaround for #498. See issue for details.

closes #498
This commit is contained in:
sharkdp 2020-05-19 16:07:12 +02:00 committed by David Peter
parent c8746f6216
commit 1d1eefdb7b
3 changed files with 7 additions and 3 deletions

View File

@ -58,7 +58,10 @@ users = "0.10.0"
[target.'cfg(all(unix, not(target_os = "redox")))'.dependencies]
libc = "0.2"
[target.'cfg(all(not(windows), not(target_env = "musl")))'.dependencies]
# FIXME: Re-enable jemalloc on macOS
# jemalloc is currently disabled on macOS due to a bug in jemalloc in combination with macOS
# Catalina. See https://github.com/sharkdp/fd/issues/498 for details.
[target.'cfg(all(not(windows), not(target_os = "macos"), not(target_env = "musl")))'.dependencies]
jemallocator = "0.3.0"
[dev-dependencies]

2
ci/script.bash vendored
View File

@ -7,5 +7,5 @@ cargo build --target "$TARGET" --verbose
# We cannot run arm executables on linux
if [[ $TARGET != arm-unknown-linux-* ]]; then
cargo test --target "$TARGET" --verbose --release
cargo test --target "$TARGET" --verbose
fi

View File

@ -33,7 +33,8 @@ use crate::options::Options;
use crate::regex_helper::pattern_has_uppercase_char;
// We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/481
#[cfg(all(not(windows), not(target_env = "musl")))]
// FIXME: re-enable jemalloc on macOS, see comment in Cargo.toml file for more infos
#[cfg(all(not(windows), not(target_os = "macos"), not(target_env = "musl")))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;