diff --git a/Cargo.lock b/Cargo.lock index 65d396a2eb..395720533d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -359,7 +359,7 @@ version = "0.100.0-pre" dependencies = [ "ckb-bin", "ckb-build-info", - "jemallocator", + "tikv-jemallocator", ] [[package]] @@ -787,8 +787,8 @@ dependencies = [ "ckb-metrics", "futures", "heim", - "jemalloc-ctl", - "jemalloc-sys", + "tikv-jemalloc-ctl", + "tikv-jemalloc-sys", ] [[package]] @@ -1836,7 +1836,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "255bae09c55bba9e35b7ab3de3c2b959b7c91b64f3ea68020bb0e805eca8e5ac" dependencies = [ "faux_macros", - "paste 1.0.5", + "paste", ] [[package]] @@ -2586,38 +2586,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" -[[package]] -name = "jemalloc-ctl" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c502a5ff9dd2924f1ed32ba96e3b65735d837b4bfd978d3161b1702e66aca4b7" -dependencies = [ - "jemalloc-sys", - "libc", - "paste 0.1.6", -] - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2b69163a3cf2d0fffcd4e1b57921bc6d8fb97ec27f2aeef00562abdaf4ffe2a" -dependencies = [ - "jemalloc-sys", - "libc", -] - [[package]] name = "jobserver" version = "0.1.22" @@ -3320,34 +3288,12 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "paste" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" -dependencies = [ - "paste-impl", - "proc-macro-hack", -] - [[package]] name = "paste" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" -[[package]] -name = "paste-impl" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "path-clean" version = "0.1.0" @@ -4431,6 +4377,38 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "tikv-jemalloc-ctl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb833c46ecbf8b6daeccb347cefcabf9c1beb5c9b0f853e1cec45632d9963e69" +dependencies = [ + "libc", + "paste", + "tikv-jemalloc-sys", +] + +[[package]] +name = "tikv-jemalloc-sys" +version = "0.4.2+5.2.1-patched.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5844e429d797c62945a566f8da4e24c7fe3fbd5d6617fd8bf7a0b7dc1ee0f22e" +dependencies = [ + "cc", + "fs_extra", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c14a5a604eb8715bc5785018a37d00739b180bcf609916ddf4393d33d49ccdf" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + [[package]] name = "time" version = "0.1.44" diff --git a/Cargo.toml b/Cargo.toml index daaa04140c..a2becccef9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,11 +97,11 @@ opt-level = 3 opt-level = 3 [target.'cfg(all(not(target_env = "msvc"), not(target_os="macos")))'.dependencies] -jemallocator = { version = "0.3.0", features = ["unprefixed_malloc_on_supported_platforms"] } +tikv-jemallocator = { version = "0.4.0", features = ["unprefixed_malloc_on_supported_platforms"] } [features] default = [] deadlock_detection = ["ckb-bin/deadlock_detection"] with_sentry = ["ckb-bin/with_sentry"] with_dns_seeding = ["ckb-bin/with_dns_seeding"] -profiling = ["jemallocator/profiling", "ckb-bin/profiling"] +profiling = ["tikv-jemallocator/profiling", "ckb-bin/profiling"] diff --git a/src/main.rs b/src/main.rs index 71019aa1fd..15f623d055 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use ckb_build_info::Version; #[cfg(all(not(target_env = "msvc"), not(target_os = "macos")))] #[global_allocator] -static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; +static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; fn main() { let version = get_version(); diff --git a/util/memory-tracker/Cargo.toml b/util/memory-tracker/Cargo.toml index 93cf6b8f50..e3f133ef5e 100644 --- a/util/memory-tracker/Cargo.toml +++ b/util/memory-tracker/Cargo.toml @@ -16,8 +16,8 @@ ckb-db = { path = "../../db", version = "= 0.100.0-pre" } [target.'cfg(all(not(target_env = "msvc"), not(target_os="macos")))'.dependencies] heim = { version = "0.0.11", default-features=false, features = ["process"] } futures = "0.3.1" -jemalloc-ctl = "0.3.3" -jemalloc-sys = "0.3.2" +jemalloc-ctl = { package = "tikv-jemalloc-ctl", version = "0.4.2" } +jemalloc-sys = { package = "tikv-jemalloc-sys", version = "0.4.2" } [features] default = []