Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Commit 5c840dd

Browse files
authored
chore(cli): use reth_cli_util allocator (#137)
* chore(cli): use reth_cli_util allocator * remove direct jemalloc dep
1 parent fa3f2e7 commit 5c840dd

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/alphanet/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ reth-optimism-rpc.workspace = true
2222
reth-provider.workspace = true
2323
clap = { workspace = true, features = ["derive"] }
2424

25-
[target.'cfg(not(windows))'.dependencies]
26-
tikv-jemallocator = { version = "0.6", optional = true }
27-
2825
[features]
2926
default = ["jemalloc"]
3027

3128
asm-keccak = ["reth-optimism-cli/asm-keccak"]
3229

33-
jemalloc = ["dep:tikv-jemallocator"]
34-
jemalloc-prof = ["jemalloc", "tikv-jemallocator?/profiling"]
30+
jemalloc = ["reth-cli-util/jemalloc"]
31+
jemalloc-prof = ["jemalloc", "reth-cli-util/jemalloc-prof"]
3532

3633
min-error-logs = ["tracing/release_max_level_error"]
3734
min-warn-logs = ["tracing/release_max_level_warn"]

bin/alphanet/src/main.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ use reth_optimism_node::{args::RollupArgs, node::OptimismAddOns};
3131
use reth_optimism_rpc::sequencer::SequencerClient;
3232
use reth_provider::providers::BlockchainProvider2;
3333

34-
// We use jemalloc for performance reasons.
35-
#[cfg(all(feature = "jemalloc", unix))]
36-
#[doc(hidden)]
3734
#[global_allocator]
38-
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
35+
static ALLOC: reth_cli_util::allocator::Allocator = reth_cli_util::allocator::new_allocator();
3936

4037
#[doc(hidden)]
4138
fn main() {

0 commit comments

Comments
 (0)