2024-04-27 16:08:50 -07:00
|
|
|
//! Integration with allocators
|
2024-04-27 04:50:20 -07:00
|
|
|
|
2026-11-21 02:10:36 +00:00
|
|
|
// jemalloc
|
|
|
|
|
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
|
2024-05-09 15:59:08 -07:00
|
|
|
pub mod je;
|
2026-11-21 02:10:36 +00:00
|
|
|
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
|
2026-09-24 15:30:29 +02:00
|
|
|
pub use je::{memory_stats, memory_usage, memory_usage_stats, trim};
|
2024-04-27 04:50:20 -07:00
|
|
|
|
2026-11-21 02:10:36 +00:00
|
|
|
// mimalloc
|
|
|
|
|
#[cfg(all(feature = "mimalloc", any(target_env = "msvc", not(feature = "jemalloc"))))]
|
2026-11-21 01:52:39 +00:00
|
|
|
pub mod mimalloc;
|
2024-04-27 16:08:50 -07:00
|
|
|
|
2026-11-21 02:10:36 +00:00
|
|
|
// default
|
|
|
|
|
#[cfg(any(target_env = "msvc", not(feature = "jemalloc")))]
|
|
|
|
|
pub mod default;
|
|
|
|
|
#[cfg(any(target_env = "msvc", not(feature = "jemalloc")))]
|
2026-09-24 15:30:29 +02:00
|
|
|
pub use default::{memory_stats, memory_usage, memory_usage_stats, trim};
|