uv_performance_memory_allocator/lib.rs
1//! The only purpose of this crate is to pull in `mimalloc` on windows and
2//! `tikv-jemallocator` on most other platforms.
3
4#[cfg(target_os = "windows")]
5#[global_allocator]
6static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
7
8#[cfg(all(
9 not(target_os = "windows"),
10 not(target_os = "openbsd"),
11 not(target_os = "freebsd"),
12 any(
13 target_arch = "x86_64",
14 target_arch = "aarch64",
15 target_arch = "powerpc64"
16 )
17))]
18#[global_allocator]
19static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;