Skip to content

Commit

Permalink
feat: Remove feature of disabling jemalloc (#7640)
Browse files Browse the repository at this point in the history
Closes #7639
  • Loading branch information
akhi3030 authored and nikurt committed Nov 9, 2022
1 parent f8df15f commit 3577d2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions neard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "0.4.0"
tokio = { version = "1.16.1", features = ["rt-multi-thread"] }
tracing = "0.1.13"

Expand All @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion neard/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static DEFAULT_HOME: Lazy<PathBuf> = Lazy::new(get_default_home);
static ALLOC: near_rust_allocator_proxy::ProxyAllocator<tikv_jemallocator::Jemalloc> =
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;

Expand Down

0 comments on commit 3577d2f

Please sign in to comment.