Skip to content

Commit

Permalink
Use mimalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed May 8, 2024
1 parent f180b08 commit 438018a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
21 changes: 21 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ lz4 = "1.24.0"
memmap2 = "0.5.10"
memoffset = "0.9"
merlin = "3"
mimalloc = "0.1.41"
min-max-heap = "1.3.0"
mockall = "0.11.4"
modular-bitfield = "0.11.2"
Expand Down
1 change: 1 addition & 0 deletions ledger-tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ futures = { workspace = true }
histogram = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
mimalloc = { workspace = true }
num_cpus = { workspace = true }
rayon = { workspace = true }
regex = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,11 @@ fn assert_capitalization(bank: &Bank) {
}

#[cfg(not(target_env = "msvc"))]
use jemallocator::Jemalloc;
use mimalloc::MiMalloc;

#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
static GLOBAL: MiMalloc = MiMalloc;

#[allow(clippy::cognitive_complexity)]
fn main() {
Expand Down
1 change: 1 addition & 0 deletions validator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jsonrpc-ipc-server = { workspace = true }
lazy_static = { workspace = true }
libloading = { workspace = true }
log = { workspace = true }
mimalloc = { workspace = true }
num_cpus = { workspace = true }
rand = { workspace = true }
rayon = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions validator/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(clippy::arithmetic_side_effects)]
#[cfg(not(target_env = "msvc"))]
use jemallocator::Jemalloc;
use mimalloc::MiMalloc;
use {
agave_validator::{
admin_rpc_service,
Expand Down Expand Up @@ -88,7 +88,7 @@ use {

#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
static GLOBAL: MiMalloc = MiMalloc;

#[derive(Debug, PartialEq, Eq)]
enum Operation {
Expand Down

0 comments on commit 438018a

Please sign in to comment.