deps: switch to tikv-jemallocator

It is now a recommended crate for jemalloc and it contains an
[important fix for compilation on riscv64gc-unknown-linux-musl][fix],
I bumped into this when I was trying to
[build ripgrep on OpenWrt][openwrt].

Closes #2889

[fix]: https://github.com/tikv/jemallocator/pull/67
[openwrt]: https://github.com/openwrt/packages/pull/24961
This commit is contained in:
Aleksey Vasilenko
2024-09-12 17:27:46 +03:00
committed by Andrew Gallant
parent cf91d6e67a
commit 83a4af7cb8
3 changed files with 24 additions and 24 deletions

42
Cargo.lock generated
View File

@@ -261,26 +261,6 @@ version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[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]] [[package]]
name = "jobserver" name = "jobserver"
version = "0.1.33" version = "0.1.33"
@@ -413,7 +393,6 @@ dependencies = [
"bstr", "bstr",
"grep", "grep",
"ignore", "ignore",
"jemallocator",
"lexopt", "lexopt",
"log", "log",
"serde", "serde",
@@ -421,6 +400,7 @@ dependencies = [
"serde_json", "serde_json",
"termcolor", "termcolor",
"textwrap", "textwrap",
"tikv-jemallocator",
"walkdir", "walkdir",
] ]
@@ -503,6 +483,26 @@ version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057"
[[package]]
name = "tikv-jemalloc-sys"
version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "tikv-jemallocator"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cec5ff18518d81584f477e9bfdf957f5bb0979b0bac3af4ca30b5b3ae2d2865"
dependencies = [
"libc",
"tikv-jemalloc-sys",
]
[[package]] [[package]]
name = "unicode-ident" name = "unicode-ident"
version = "1.0.18" version = "1.0.18"

View File

@@ -60,8 +60,8 @@ serde_json = "1.0.23"
termcolor = "1.1.0" termcolor = "1.1.0"
textwrap = { version = "0.16.0", default-features = false } textwrap = { version = "0.16.0", default-features = false }
[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.jemallocator] [target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.tikv-jemallocator]
version = "0.5.0" version = "0.6.0"
[dev-dependencies] [dev-dependencies]
serde = "1.0.77" serde = "1.0.77"

View File

@@ -37,7 +37,7 @@ mod search;
// i686. // i686.
#[cfg(all(target_env = "musl", target_pointer_width = "64"))] #[cfg(all(target_env = "musl", target_pointer_width = "64"))]
#[global_allocator] #[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
/// Then, as it was, then again it will be. /// Then, as it was, then again it will be.
fn main() -> ExitCode { fn main() -> ExitCode {