Skip to content

Commit f8a8405

Browse files
committed
perf: switch global alloc to tikv-jemallocator
1 parent 8383616 commit f8a8405

File tree

4 files changed

+41
-63
lines changed

4 files changed

+41
-63
lines changed

Cargo.lock

Lines changed: 36 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ opt-level = 3
9797
opt-level = 3
9898

9999
[target.'cfg(all(not(target_env = "msvc"), not(target_os="macos")))'.dependencies]
100-
jemallocator = { version = "0.3.0", features = ["unprefixed_malloc_on_supported_platforms"] }
100+
tikv-jemallocator = { version = "0.4.0", features = ["unprefixed_malloc_on_supported_platforms"] }
101101

102102
[features]
103103
default = []
104104
deadlock_detection = ["ckb-bin/deadlock_detection"]
105105
with_sentry = ["ckb-bin/with_sentry"]
106106
with_dns_seeding = ["ckb-bin/with_dns_seeding"]
107-
profiling = ["jemallocator/profiling", "ckb-bin/profiling"]
107+
profiling = ["tikv-jemallocator/profiling", "ckb-bin/profiling"]

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use ckb_build_info::Version;
44

55
#[cfg(all(not(target_env = "msvc"), not(target_os = "macos")))]
66
#[global_allocator]
7-
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
7+
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
88

99
fn main() {
1010
let version = get_version();

util/memory-tracker/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ ckb-db = { path = "../../db", version = "= 0.100.0-pre" }
1616
[target.'cfg(all(not(target_env = "msvc"), not(target_os="macos")))'.dependencies]
1717
heim = { version = "0.0.11", default-features=false, features = ["process"] }
1818
futures = "0.3.1"
19-
jemalloc-ctl = "0.3.3"
20-
jemalloc-sys = "0.3.2"
19+
jemalloc-ctl = { package = "tikv-jemalloc-ctl", version = "0.4.2" }
20+
jemalloc-sys = { package = "tikv-jemalloc-sys", version = "0.4.2" }
2121

2222
[features]
2323
default = []

0 commit comments

Comments
 (0)