mirror of https://github.com/sharkdp/fd.git
Disable jemalloc on macOS
This is a workaround for #498. See issue for details. closes #498
This commit is contained in:
parent
c8746f6216
commit
1d1eefdb7b
|
@ -58,7 +58,10 @@ users = "0.10.0"
|
||||||
[target.'cfg(all(unix, not(target_os = "redox")))'.dependencies]
|
[target.'cfg(all(unix, not(target_os = "redox")))'.dependencies]
|
||||||
libc = "0.2"
|
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"
|
jemallocator = "0.3.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -7,5 +7,5 @@ cargo build --target "$TARGET" --verbose
|
||||||
|
|
||||||
# We cannot run arm executables on linux
|
# We cannot run arm executables on linux
|
||||||
if [[ $TARGET != arm-unknown-linux-* ]]; then
|
if [[ $TARGET != arm-unknown-linux-* ]]; then
|
||||||
cargo test --target "$TARGET" --verbose --release
|
cargo test --target "$TARGET" --verbose
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -33,7 +33,8 @@ use crate::options::Options;
|
||||||
use crate::regex_helper::pattern_has_uppercase_char;
|
use crate::regex_helper::pattern_has_uppercase_char;
|
||||||
|
|
||||||
// We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/481
|
// 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]
|
#[global_allocator]
|
||||||
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue