Skip to content

Commit ada6680

Browse files
committed
fix: disable mimalloc for arm platform
1 parent b4da0fe commit ada6680

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ crate-type = ["cdylib"]
1111
[dependencies]
1212
numpy = "0.28"
1313
pyo3 = { version = "0.28", features = ["extension-module"] }
14-
mimalloc = { version = "*", features = ["v3"] }
1514
memmap2 = "0.9"
1615
lexical-core = "1"
1716

17+
[target.'cfg(not(all(target_os = "linux", any(target_arch = "aarch64", target_arch = "arm"))))'.dependencies]
18+
mimalloc = { version = "*", features = ["v3"] }
19+
1820
[profile.release]
1921
lto = "fat"
2022
codegen-units = 1

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ use numpy::{
77
use pyo3::{exceptions::PyValueError, prelude::*};
88
use std::fs::File;
99

10+
#[cfg(not(all(target_os = "linux", any(target_arch = "aarch64", target_arch = "arm"))))]
1011
use mimalloc::MiMalloc;
1112

13+
#[cfg(not(all(target_os = "linux", any(target_arch = "aarch64", target_arch = "arm"))))]
1214
#[global_allocator]
1315
static GLOBAL: MiMalloc = MiMalloc;
1416

0 commit comments

Comments
 (0)