Skip to content

Commit 3243138

Browse files
committed
Replace mimalloc with jemalloc
1 parent 1afe3a2 commit 3243138

File tree

3 files changed

+27
-23
lines changed

3 files changed

+27
-23
lines changed

zerofs/Cargo.lock

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

zerofs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ codegen-units = 16
2424

2525
[dependencies]
2626
slatedb = "0.8.2"
27-
mimalloc = "0.1"
27+
tikv-jemallocator = "0.6.0"
2828
zerofs_nfsserve = "0.15"
2929
tokio = { version = "1.46", features = ["full"] }
3030
async-trait = "0.1"

zerofs/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use anyhow::Result;
2-
use mimalloc::MiMalloc;
32
use std::io::BufRead;
43

54
mod bucket_identity;
@@ -20,8 +19,12 @@ mod test_helpers;
2019
#[cfg(test)]
2120
mod posix_tests;
2221

22+
#[cfg(not(target_env = "msvc"))]
23+
use tikv_jemallocator::Jemalloc;
24+
25+
#[cfg(not(target_env = "msvc"))]
2326
#[global_allocator]
24-
static GLOBAL: MiMalloc = MiMalloc;
27+
static GLOBAL: Jemalloc = Jemalloc;
2528

2629
#[tokio::main]
2730
async fn main() -> Result<()> {

0 commit comments

Comments
 (0)