From 024531c212febc3eecb11874f1e879ea270ae590 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Thu, 21 Apr 2022 22:09:58 +0200 Subject: [PATCH] refactor: move to maintained jemalloc (`tikv-jemallocator`) refs: - gnzlbg/jemallocator#173 - rust-lang/rust#83152 --- Cargo.lock | 44 ++++++++++++++++++++++---------------------- Cargo.toml | 4 ++-- src/bin/server.rs | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a1ca392..e6c88f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -468,27 +468,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] -name = "jemalloc-sys" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" -dependencies = [ - "cc", - "fs_extra", - "libc", -] - -[[package]] -name = "jemallocator" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69" -dependencies = [ - "jemalloc-sys", - "libc", -] - -[[package]] name = "js-sys" version = "0.3.57" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -880,7 +859,6 @@ dependencies = [ "http", "humansize", "hyper", - "jemallocator", "listenfd", "mime_guess", "num_cpus", @@ -889,6 +867,7 @@ dependencies = [ "signal-hook", "signal-hook-tokio", "structopt", + "tikv-jemallocator", "time", "tokio", "tokio-rustls", @@ -951,6 +930,27 @@ dependencies = [ ] [[package]] +name = "tikv-jemalloc-sys" +version = "0.4.3+5.2.1-patched.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" +dependencies = [ + "cc", + "fs_extra", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5b7bcecfafe4998587d636f9ae9d55eb9d0499877b88757767c346875067098" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + +[[package]] name = "time" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/Cargo.toml b/Cargo.toml index 58446e1..285b413 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,8 +51,8 @@ tracing = { version = "0.1", default-features = false, features = ["std"] } tracing-subscriber = { version = "0.3", default-features = false, features = ["smallvec", "parking_lot", "fmt", "ansi", "tracing-log"] } form_urlencoded = "1.0" -[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.jemallocator] -version = "0.3" +[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.tikv-jemallocator] +version = "0.4" [target.'cfg(unix)'.dependencies] signal-hook = { version = "0.3", features = ["extended-siginfo"] } diff --git a/src/bin/server.rs b/src/bin/server.rs index a78e4d2..b5ac46b 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -5,7 +5,7 @@ #[cfg(all(target_env = "musl", target_pointer_width = "64"))] #[global_allocator] -static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; +static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; use static_web_server::{Result, Server}; -- libgit2 1.7.2