1
0
mirror of https://github.com/sharkdp/fd synced 2024-06-28 22:04:23 +00:00

Use tikv-jemallocator instead of jemallocator

From documentation of the tikv-jemallocator project:

> The project is also published as jemallocator for historical reasons. The two crates are the same except names.
> For new projects, it's recommended to use tikv-xxx versions instead.
This commit is contained in:
Thayne McCombs 2024-06-07 17:01:47 -06:00
parent f1a4a29264
commit 7b33fa736b
3 changed files with 24 additions and 24 deletions

42
Cargo.lock generated
View File

@ -325,7 +325,6 @@ dependencies = [
"globset",
"humantime",
"ignore",
"jemallocator",
"libc",
"lscolors",
"nix 0.28.0",
@ -335,6 +334,7 @@ dependencies = [
"regex-syntax",
"tempfile",
"test-case",
"tikv-jemallocator",
"version_check",
]
@ -429,26 +429,6 @@ version = "1.70.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800"
[[package]]
name = "jemalloc-sys"
version = "0.5.4+5.3.0-patched"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "jemallocator"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0de374a9f8e63150e6f5e8a60cc14c668226d7a347d8aee1a45766e3c4dd3bc"
dependencies = [
"jemalloc-sys",
"libc",
]
[[package]]
name = "js-sys"
version = "0.3.69"
@ -723,6 +703,26 @@ dependencies = [
"test-case-core",
]
[[package]]
name = "tikv-jemalloc-sys"
version = "0.5.4+5.3.0-patched"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "tikv-jemallocator"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca"
dependencies = [
"libc",
"tikv-jemalloc-sys",
]
[[package]]
name = "unicode-ident"
version = "1.0.12"

View File

@ -74,7 +74,7 @@ libc = "0.2"
# 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 = "android"), not(target_os = "macos"), not(target_os = "freebsd"), not(target_os = "openbsd"), not(all(target_env = "musl", target_pointer_width = "32")), not(target_arch = "riscv64")))'.dependencies]
jemallocator = {version = "0.5.4", optional = true}
tikv-jemallocator = {version = "0.5.4", optional = true}
[dev-dependencies]
diff = "0.1"
@ -89,7 +89,7 @@ codegen-units = 1
panic = "abort"
[features]
use-jemalloc = ["jemallocator"]
use-jemalloc = ["tikv-jemallocator"]
completions = ["clap_complete"]
base = ["use-jemalloc"]
default = ["use-jemalloc", "completions"]

View File

@ -47,7 +47,7 @@ use crate::regex_helper::{pattern_has_uppercase_char, pattern_matches_strings_wi
feature = "use-jemalloc"
))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
// vivid --color-mode 8-bit generate molokai
const DEFAULT_LS_COLORS: &str = "