Skip to content

Commit

Permalink
Merge pull request #2105 from subspace/mimalloc
Browse files Browse the repository at this point in the history
Use mimalloc allocator on all platforms for node and farmer
  • Loading branch information
nazar-pc authored Oct 13, 2023
2 parents 2ba9031 + af3684d commit 014ee55
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 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 crates/subspace-farmer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ futures = "0.3.28"
hex = { version = "0.4.3", features = ["serde"] }
jsonrpsee = { version = "0.16.3", features = ["client"] }
lru = "0.11.0"
mimalloc = "0.1.39"
parity-scale-codec = "3.6.5"
parking_lot = "0.12.1"
prometheus-client = "0.21.2"
Expand Down
3 changes: 3 additions & 0 deletions crates/subspace-farmer/src/bin/subspace-farmer/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ use tracing_subscriber::filter::LevelFilter;
use tracing_subscriber::prelude::*;
use tracing_subscriber::{fmt, EnvFilter};

#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

type PosTable = ChiaTable;

fn available_parallelism() -> usize {
Expand Down
1 change: 1 addition & 0 deletions crates/subspace-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ futures = "0.3.28"
hex = "0.4.3"
hex-literal = "0.4.1"
log = "0.4.20"
mimalloc = "0.1.39"
parity-scale-codec = "3.6.5"
sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "920fb277d5ea16a3b0918052c7555026a1ac2c6c" }
sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "920fb277d5ea16a3b0918052c7555026a1ac2c6c", default-features = false }
Expand Down
3 changes: 3 additions & 0 deletions crates/subspace-node/src/bin/subspace-node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

//! Subspace node implementation.
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

use cross_domain_message_gossip::GossipWorkerBuilder;
use domain_client_operator::Bootstrapper;
use domain_runtime_primitives::opaque::Block as DomainBlock;
Expand Down

0 comments on commit 014ee55

Please sign in to comment.