mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-14 04:22:02 +00:00
19 lines
551 B
Rust
19 lines
551 B
Rust
//! 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"),
|
|
not(target_os = "freebsd"),
|
|
any(
|
|
target_arch = "x86_64",
|
|
target_arch = "aarch64",
|
|
target_arch = "powerpc64"
|
|
)
|
|
))]
|
|
#[global_allocator]
|
|
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|