2024-09-25 17:41:40 +02:00
|
|
|
//! The only purpose of this crate is to pull in `mimalloc` on windows and
|
|
|
|
|
//! `tikv-jemallocator` on most other platforms.
|
|
|
|
|
|
|
|
|
|
#[cfg(target_os = "windows")]
|
|
|
|
|
#[global_allocator]
|
|
|
|
|
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
|
|
|
|
|
|
|
|
|
#[cfg(all(
|
|
|
|
|
not(target_os = "windows"),
|
|
|
|
|
not(target_os = "openbsd"),
|
2024-09-29 17:49:07 +02:00
|
|
|
not(target_os = "freebsd"),
|
2024-09-25 17:41:40 +02:00
|
|
|
any(
|
|
|
|
|
target_arch = "x86_64",
|
|
|
|
|
target_arch = "aarch64",
|
|
|
|
|
target_arch = "powerpc64"
|
|
|
|
|
)
|
|
|
|
|
))]
|
|
|
|
|
#[global_allocator]
|
|
|
|
|
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|