Clean up "performance allocators" and "performance flate2" backends (#7686)

Co-authored-by: Amos Wenger <amos@bearcove.net>
This commit is contained in:
konsti 2024-09-25 17:41:40 +02:00 committed by GitHub
parent 12ab7d1ab7
commit f5601e2610
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 189 additions and 74 deletions

View 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;