Skip to content

Commit 7a58029

Browse files
committed
Use tikv-jemallocator as global allocator
1 parent cd79c93 commit 7a58029

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

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.

crates/cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ sd-notify = "0.4.5"
3737
serde_json.workspace = true
3838
serde_yaml = "0.9.34"
3939
sqlx.workspace = true
40+
tikv-jemallocator = "0.6.0"
4041
tokio.workspace = true
4142
tokio-util.workspace = true
4243
tokio-stream.workspace = true

crates/cli/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use anyhow::Context;
1212
use clap::Parser;
1313
use mas_config::{ConfigurationSection, TelemetryConfig};
1414
use sentry_tracing::EventFilter;
15+
use tikv_jemallocator::Jemalloc;
1516
use tracing_indicatif::{
1617
filter::{hide_indicatif_span_fields, IndicatifFilter},
1718
style::ProgressStyle,
@@ -22,6 +23,9 @@ use tracing_subscriber::{
2223
EnvFilter, Layer, Registry,
2324
};
2425

26+
#[global_allocator]
27+
static GLOBAL: Jemalloc = Jemalloc;
28+
2529
mod app_state;
2630
mod commands;
2731
mod lifecycle;

0 commit comments

Comments
 (0)