feat: Add mimalloc support, drop hardened_malloc

This commit is contained in:
timedout authored and Jade Ellis committed 2026-11-21 15:21:54 +00:00
1 parent 68068574d3
commit d4ac77a023
8 files changed
+44 -68

No files matched your search

+7 -20
View File
@@ -1,27 +1,14 @@
//! Integration with allocators
// jemalloc
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
pub mod default;
#[cfg(feature = "jemalloc")]
pub mod je;
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
#[cfg(feature = "jemalloc")]
pub use je::{memory_stats, memory_usage, memory_usage_stats, trim};
#[cfg(all(not(target_env = "msvc"), feature = "hardened_malloc", not(feature = "jemalloc")))]
pub mod hardened;
#[cfg(all(
not(target_env = "msvc"),
feature = "hardened_malloc",
not(feature = "jemalloc")
))]
pub use hardened::{memory_stats, memory_usage, memory_usage_stats, trim};
#[cfg(all(feature = "mimalloc", not(feature = "jemalloc")))]
pub mod mimalloc;
#[cfg(any(
target_env = "msvc",
all(not(feature = "hardened_malloc"), not(feature = "jemalloc"))
))]
pub mod default;
#[cfg(any(
target_env = "msvc",
all(not(feature = "hardened_malloc"), not(feature = "jemalloc"))
))]
#[cfg(not(feature = "jemalloc"))]
pub use default::{memory_stats, memory_usage, memory_usage_stats, trim};