shadowsocks_rust/allocator/
mod.rs

1//! Memory allocator
2
3#[cfg(feature = "jemalloc")]
4#[global_allocator]
5static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
6
7#[cfg(feature = "tcmalloc")]
8#[global_allocator]
9static ALLOC: tcmalloc::TCMalloc = tcmalloc::TCMalloc;
10
11#[cfg(feature = "mimalloc")]
12#[global_allocator]
13static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
14
15#[cfg(feature = "snmalloc")]
16#[global_allocator]
17static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
18
19#[cfg(feature = "rpmalloc")]
20#[global_allocator]
21static ALLOC: rpmalloc::RpMalloc = rpmalloc::RpMalloc;