diff --git a/Cargo.toml b/Cargo.toml index fc17bd7ce..85d325f7f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ tokio = { version = "1", features = ["full"] } async-trait = { version = "0.1.84" } serde = { version = "1.0", features = ["derive"] } slatedb = { version = "0.2.0" } +snmalloc-rs = { version = "0.3" } bytes = { version = "1" } object_store = { version = "0.11.1", features = ["aws", "gcp", "azure"] } serde_json = "1.0" diff --git a/bin/bucketd/Cargo.toml b/bin/bucketd/Cargo.toml index bf54edd6e..488263dbe 100644 --- a/bin/bucketd/Cargo.toml +++ b/bin/bucketd/Cargo.toml @@ -11,6 +11,7 @@ dotenv = { version = "0.15.0" } nexus = { path = "../../crates/nexus" } object_store = { workspace = true } tokio = { workspace = true } +snmalloc-rs = { workspace = true } tracing = { version = "0.1" } tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/bin/bucketd/src/main.rs b/bin/bucketd/src/main.rs index 73ff3fc5d..121aa3620 100644 --- a/bin/bucketd/src/main.rs +++ b/bin/bucketd/src/main.rs @@ -21,6 +21,9 @@ use clap::Parser; use dotenv::dotenv; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; +#[global_allocator] +static ALLOCATOR: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc; + #[tokio::main] #[allow(clippy::expect_used, clippy::unwrap_used, clippy::print_stdout)] async fn main() {