From 50255cedf9b6111bcd9a3fa02d8935a52d39a743 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:00:28 -0400 Subject: [PATCH] chore(cli): use reth_cli_util allocator --- bin/alphanet/Cargo.toml | 2 +- bin/alphanet/src/main.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/alphanet/Cargo.toml b/bin/alphanet/Cargo.toml index a15ef6b..7b47db0 100644 --- a/bin/alphanet/Cargo.toml +++ b/bin/alphanet/Cargo.toml @@ -30,7 +30,7 @@ default = ["jemalloc"] asm-keccak = ["reth-optimism-cli/asm-keccak"] -jemalloc = ["dep:tikv-jemallocator"] +jemalloc = ["dep:tikv-jemallocator", "reth-cli-util/jemalloc"] jemalloc-prof = ["jemalloc", "tikv-jemallocator?/profiling"] min-error-logs = ["tracing/release_max_level_error"] diff --git a/bin/alphanet/src/main.rs b/bin/alphanet/src/main.rs index d1963e4..6b44456 100644 --- a/bin/alphanet/src/main.rs +++ b/bin/alphanet/src/main.rs @@ -31,11 +31,8 @@ use reth_optimism_node::{args::RollupArgs, node::OptimismAddOns}; use reth_optimism_rpc::sequencer::SequencerClient; use reth_provider::providers::BlockchainProvider2; -// We use jemalloc for performance reasons. -#[cfg(all(feature = "jemalloc", unix))] -#[doc(hidden)] #[global_allocator] -static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; +static ALLOC: reth_cli_util::allocator::Allocator = reth_cli_util::allocator::new_allocator(); #[doc(hidden)] fn main() {