From 6b59c92d91ff1d3c3ba6f051a57d92f7569d1ac6 Mon Sep 17 00:00:00 2001 From: Akhi Singhania Date: Mon, 19 Sep 2022 14:42:58 +0200 Subject: [PATCH 1/2] Remove feature of disabling jemalloc --- neard/Cargo.toml | 11 +++-------- neard/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/neard/Cargo.toml b/neard/Cargo.toml index 1466fed81ad..b6ba77966a6 100644 --- a/neard/Cargo.toml +++ b/neard/Cargo.toml @@ -25,7 +25,7 @@ serde = { version = "1", features = ["derive"] } serde_json = "1" shell-escape = "0.1.5" thiserror = "1" -tikv-jemallocator = { version = "0.4.0", optional = true } +tikv-jemallocator = { version = "0.4.0" } tokio = { version = "1.16.1", features = ["rt-multi-thread"] } tracing = "0.1.13" @@ -42,15 +42,10 @@ anyhow = "1.0.51" rustc_version = "0.4" [features] -default = ["json_rpc", "rosetta_rpc", "jemalloc"] +default = ["json_rpc", "rosetta_rpc"] -jemalloc = ["tikv-jemallocator"] performance_stats = ["nearcore/performance_stats"] -memory_stats = [ - "nearcore/memory_stats", - "near-rust-allocator-proxy", - "jemalloc", -] +memory_stats = ["nearcore/memory_stats", "near-rust-allocator-proxy"] c_memory_stats = ["nearcore/c_memory_stats"] test_features = ["nearcore/test_features"] expensive_tests = ["nearcore/expensive_tests"] diff --git a/neard/src/main.rs b/neard/src/main.rs index 1da995ae4f1..bd6fb195f33 100644 --- a/neard/src/main.rs +++ b/neard/src/main.rs @@ -37,7 +37,7 @@ static DEFAULT_HOME: Lazy = Lazy::new(get_default_home); static ALLOC: near_rust_allocator_proxy::ProxyAllocator = near_rust_allocator_proxy::ProxyAllocator::new(tikv_jemallocator::Jemalloc); -#[cfg(all(not(feature = "memory_stats"), feature = "jemalloc"))] +#[cfg(not(feature = "memory_stats"))] #[global_allocator] static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; From 2e8f1f3d6500bcb4832fd8a3a26d205e363aa8cb Mon Sep 17 00:00:00 2001 From: Akhilesh Singhania Date: Mon, 19 Sep 2022 16:28:11 +0200 Subject: [PATCH 2/2] Update neard/Cargo.toml Co-authored-by: Aleksey Kladov --- neard/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neard/Cargo.toml b/neard/Cargo.toml index b6ba77966a6..cd2a8700da7 100644 --- a/neard/Cargo.toml +++ b/neard/Cargo.toml @@ -25,7 +25,7 @@ serde = { version = "1", features = ["derive"] } serde_json = "1" shell-escape = "0.1.5" thiserror = "1" -tikv-jemallocator = { version = "0.4.0" } +tikv-jemallocator = "0.4.0" tokio = { version = "1.16.1", features = ["rt-multi-thread"] } tracing = "0.1.13"