chore(deps): use tikv-jemallocator instead of jemallocator (#7232)

This commit is contained in:
DaniPopes
2024-03-19 18:13:23 +01:00
committed by GitHub
parent ce89a2be8d
commit 9d039a233c
10 changed files with 79 additions and 96 deletions

View File

@ -95,10 +95,8 @@ itertools.workspace = true
rayon.workspace = true
boyer-moore-magiclen = "0.2.16"
[target.'cfg(not(windows))'.dependencies]
jemallocator = { version = "0.5.0", optional = true }
[target.'cfg(unix)'.dependencies]
tikv-jemallocator = { version = "0.5.0", optional = true }
libc = "0.2"
[dev-dependencies]
@ -110,8 +108,8 @@ default = ["jemalloc"]
asm-keccak = ["reth-primitives/asm-keccak"]
jemalloc = ["dep:jemallocator", "reth-node-core/jemalloc"]
jemalloc-prof = ["jemalloc", "jemallocator?/profiling"]
jemalloc = ["dep:tikv-jemallocator", "reth-node-core/jemalloc"]
jemalloc-prof = ["jemalloc", "tikv-jemallocator?/profiling"]
min-error-logs = ["tracing/release_max_level_error"]
min-warn-logs = ["tracing/release_max_level_warn"]

View File

@ -163,7 +163,7 @@ pub mod sigsegv_handler {
}
#[cfg(all(feature = "jemalloc", unix))]
use jemallocator as _;
use tikv_jemallocator as _;
// for rendering diagrams
use aquamarine as _;

View File

@ -3,7 +3,7 @@
// We use jemalloc for performance reasons.
#[cfg(all(feature = "jemalloc", unix))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
#[cfg(all(feature = "optimism", not(test)))]
compile_error!("Cannot build the `reth` binary with the `optimism` feature flag enabled. Did you mean to build `op-reth`?");

View File

@ -9,7 +9,7 @@ use reth_provider::BlockReaderIdExt;
// We use jemalloc for performance reasons
#[cfg(all(feature = "jemalloc", unix))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
#[cfg(not(feature = "optimism"))]
compile_error!("Cannot build the `op-reth` binary with the `optimism` feature flag disabled. Did you mean to build `reth`?");