Skip to content

Commit 485b030

Browse files
committed
add mimalloc
1 parent 3d99603 commit 485b030

File tree

9 files changed

+81
-0
lines changed

9 files changed

+81
-0
lines changed

integration-tests/Cargo.lock

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

miner-apps/Cargo.lock

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

miner-apps/jd-client/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ clap = { version = "4.5.39", features = ["derive"] }
2626
bitcoin_core_sv2 = { path = "../../bitcoin-core-sv2" }
2727
hex = "0.4.3"
2828
hotpath = "0.9"
29+
mimalloc = "0.1.48"
2930

3031
[features]
3132
hotpath = ["hotpath/hotpath"]

miner-apps/jd-client/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ use jd_client_sv2::JobDeclaratorClient;
22
use stratum_apps::config_helpers::logging::init_logging;
33

44
use crate::args::process_cli_args;
5+
use mimalloc::MiMalloc;
6+
7+
// Add mimalloc
8+
#[global_allocator]
9+
static GLOBAL: MiMalloc = MiMalloc;
510

611
mod args;
712

miner-apps/translator/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ clap = { version = "4.5.39", features = ["derive"] }
3131
hex = "0.4.3"
3232
hotpath = "0.9"
3333
dashmap = "6.1.0"
34+
mimalloc = "0.1.48"
3435

3536
[features]
3637
hotpath = ["hotpath/hotpath"]

miner-apps/translator/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ use stratum_apps::config_helpers::logging::init_logging;
33
pub use translator_sv2::{config, error, status, sv1, sv2, TranslatorSv2};
44

55
use crate::args::process_cli_args;
6+
use mimalloc::MiMalloc;
7+
8+
// Add mimalloc
9+
#[global_allocator]
10+
static GLOBAL: MiMalloc = MiMalloc;
611

712
#[cfg(all(feature = "hotpath-alloc", not(test)))]
813
#[tokio::main(flavor = "current_thread")]

pool-apps/Cargo.lock

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

pool-apps/pool/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ clap = { version = "4.5.39", features = ["derive"] }
2929
bitcoin_core_sv2 = { path = "../../bitcoin-core-sv2" }
3030
hex = "0.4.3"
3131
hotpath = "0.9"
32+
mimalloc = "0.1.48"
3233

3334
[features]
3435
hotpath = ["hotpath/hotpath"]

pool-apps/pool/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ use pool_sv2::PoolSv2;
22
use stratum_apps::config_helpers::logging::init_logging;
33

44
use crate::args::process_cli_args;
5+
use mimalloc::MiMalloc;
6+
7+
// Add mimalloc
8+
#[global_allocator]
9+
static GLOBAL: MiMalloc = MiMalloc;
510

611
mod args;
712

0 commit comments

Comments
 (0)