From b7437499c5802f10d5b98b60f2c6d77a11b3d2f3 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 18 Apr 2024 20:09:00 +0200 Subject: [PATCH] feat: re-enable jemalloc for anvil (#7708) --- crates/anvil/Cargo.toml | 4 +--- crates/anvil/src/anvil.rs | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/anvil/Cargo.toml b/crates/anvil/Cargo.toml index d9d443643f67..7930d437a0ea 100644 --- a/crates/anvil/Cargo.toml +++ b/crates/anvil/Cargo.toml @@ -105,6 +105,4 @@ default = ["cli"] cmd = ["clap", "clap_complete", "ctrlc", "anvil-server/clap"] cli = ["tokio/full", "cmd", "fdlimit"] asm-keccak = ["alloy-primitives/asm-keccak"] -# TODO: parity dependencies are not compatible with a different global allocator. -# jemalloc = ["dep:tikv-jemallocator"] -jemalloc = [] +jemalloc = ["dep:tikv-jemallocator"] diff --git a/crates/anvil/src/anvil.rs b/crates/anvil/src/anvil.rs index 54a5e41cf55e..1aa204587b20 100644 --- a/crates/anvil/src/anvil.rs +++ b/crates/anvil/src/anvil.rs @@ -4,8 +4,6 @@ use anvil::cmd::NodeArgs; use clap::{CommandFactory, Parser, Subcommand}; use foundry_cli::utils; -// TODO: parity dependencies are not compatible with a different global allocator. -#[cfg(any())] #[cfg(all(feature = "jemalloc", unix))] #[global_allocator] static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;