mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-26 20:19:08 +00:00
Clean up "performance allocators" and "performance flate2" backends (#7686)
Co-authored-by: Amos Wenger <amos@bearcove.net>
This commit is contained in:
parent
12ab7d1ab7
commit
f5601e2610
15 changed files with 189 additions and 74 deletions
18
crates/uv-performance-memory-allocator/src/lib.rs
Normal file
18
crates/uv-performance-memory-allocator/src/lib.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
//! 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"),
|
||||
any(
|
||||
target_arch = "x86_64",
|
||||
target_arch = "aarch64",
|
||||
target_arch = "powerpc64"
|
||||
)
|
||||
))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
Loading…
Add table
Add a link
Reference in a new issue