Skip to content

Commit b121f46

Browse files
committed
Use mimalloc
1 parent 99c8574 commit b121f46

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

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.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ terminal_size = { workspace = true }
7474
textwrap = { workspace = true }
7575
uucore = { workspace = true }
7676

77+
[target.'cfg(not(target_os = "macos"))'.dependencies]
78+
mimalloc = { version = "0.1.48", default-features = false, features = ["override"] }
79+
7780
[dev-dependencies]
7881
chrono = { workspace = true }
7982
divan = { workspace = true }

src/bin/sed.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
use std::ffi::OsString;
77
use std::process;
88

9+
#[cfg(not(target_os = "macos"))]
10+
#[global_allocator]
11+
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
12+
913
fn main() {
1014
// Detect multicall vs single-call BEFORE any uucore calls
1115
// This must happen first to set the utility name detection mode correctly

0 commit comments

Comments
 (0)