mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-06 16:14:11 +00:00
22 lines
560 B
Rust
22 lines
560 B
Rust
//! Memory allocator
|
|
|
|
#[cfg(feature = "jemalloc")]
|
|
#[global_allocator]
|
|
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
|
|
|
#[cfg(feature = "tcmalloc")]
|
|
#[global_allocator]
|
|
static ALLOC: tcmalloc::TCMalloc = tcmalloc::TCMalloc;
|
|
|
|
#[cfg(feature = "mimalloc")]
|
|
#[global_allocator]
|
|
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
|
|
|
#[cfg(feature = "snmalloc")]
|
|
#[global_allocator]
|
|
static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
|
|
|
|
#[cfg(feature = "rpmalloc")]
|
|
#[global_allocator]
|
|
static ALLOC: rpmalloc::RpMalloc = rpmalloc::RpMalloc;
|