Skip to content

Commit

Permalink
Don't use jemalloc in unsupported platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
tats-u committed Oct 10, 2024
1 parent d06a9aa commit 2ab9249
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion charabia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ german-segmentation = []

[dev-dependencies]
criterion = "0.5"
jemallocator = "0.5.4"
quickcheck = "1"
quickcheck_macros = "1"

[target.'cfg(any(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64", all(target_arch = "powerpc64", target_endian = "little"))), all(target_os = "macos", target_arch = "aarch64")))'.dev-dependencies]
jemallocator = "0.5.4"

[[bench]]
name = "bench"
Expand Down
1 change: 1 addition & 0 deletions charabia/benches/bench.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use charabia::{Language, Script, Segment, Tokenize};
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};

#[cfg(any(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64", all(target_arch = "powerpc64", target_endian = "little"))), all(target_os = "macos", target_arch = "aarch64")))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

Expand Down

0 comments on commit 2ab9249

Please sign in to comment.