2024-04-27 16:08:50 -07:00
|
|
|
//! Integration with allocators
|
2024-04-27 04:50:20 -07:00
|
|
|
|
2024-04-27 16:08:50 -07:00
|
|
|
// jemalloc
|
2024-06-22 19:28:26 +00:00
|
|
|
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
|
2024-05-09 15:59:08 -07:00
|
|
|
pub mod je;
|
2024-06-22 19:28:26 +00:00
|
|
|
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
|
2025-01-16 08:58:40 +00:00
|
|
|
pub use je::{memory_stats, memory_usage, trim};
|
2024-04-27 04:50:20 -07:00
|
|
|
|
2025-04-23 19:27:49 +00:00
|
|
|
#[cfg(all(
|
|
|
|
|
not(target_env = "msvc"),
|
|
|
|
|
feature = "hardened_malloc",
|
|
|
|
|
not(feature = "jemalloc")
|
|
|
|
|
))]
|
2024-06-22 19:28:26 +00:00
|
|
|
pub mod hardened;
|
2024-12-15 00:05:47 -05:00
|
|
|
#[cfg(all(
|
|
|
|
|
not(target_env = "msvc"),
|
|
|
|
|
feature = "hardened_malloc",
|
|
|
|
|
not(feature = "jemalloc")
|
|
|
|
|
))]
|
2025-01-16 08:58:40 +00:00
|
|
|
pub use hardened::{memory_stats, memory_usage, trim};
|
2024-04-27 04:50:20 -07:00
|
|
|
|
2024-12-15 00:05:47 -05:00
|
|
|
#[cfg(any(
|
|
|
|
|
target_env = "msvc",
|
|
|
|
|
all(not(feature = "hardened_malloc"), not(feature = "jemalloc"))
|
|
|
|
|
))]
|
2024-05-09 15:59:08 -07:00
|
|
|
pub mod default;
|
2024-12-15 00:05:47 -05:00
|
|
|
#[cfg(any(
|
|
|
|
|
target_env = "msvc",
|
|
|
|
|
all(not(feature = "hardened_malloc"), not(feature = "jemalloc"))
|
|
|
|
|
))]
|
2025-01-16 08:58:40 +00:00
|
|
|
pub use default::{memory_stats, memory_usage, trim};
|