Skip to content

Commit 9e562df

Browse files
committed
Test mimalloc
1 parent 151672d commit 9e562df

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ name = "libipld"
1313
crate-type = ["rlib", "cdylib"]
1414

1515
[dependencies]
16+
mimalloc = { version = "*", features = ["v3"] }
1617
pyo3 = { version = "0.27.1", features = ["generate-import-lib", "anyhow"] }
1718
python3-dll-a = "0.2.14"
1819
anyhow = "1.0.100"

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
use mimalloc::MiMalloc;
2+
3+
#[global_allocator]
4+
static GLOBAL: MiMalloc = MiMalloc;
5+
16
use std::io::{self, Write};
27

38
use anyhow::{anyhow, Result};

0 commit comments

Comments
 (0)