fix(alloc): Restore not(target_env = "msvc") cfg gates and gate default module

This commit is contained in:
Jade Ellis committed 2026-11-21 02:54:48 +00:00
1 parent ad1b8c6dc6
commit 110bad6ac0
2 files changed
+10 -7

No files matched your search

+9 -6
View File
@@ -1,14 +1,17 @@
//! Integration with allocators
pub mod default;
#[cfg(feature = "jemalloc")]
// jemalloc
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
pub mod je;
#[cfg(feature = "jemalloc")]
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
pub use je::{memory_stats, memory_usage, memory_usage_stats, trim};
#[cfg(all(feature = "mimalloc", not(feature = "jemalloc")))]
// mimalloc
#[cfg(all(feature = "mimalloc", any(target_env = "msvc", not(feature = "jemalloc"))))]
pub mod mimalloc;
#[cfg(not(feature = "jemalloc"))]
// default
#[cfg(any(target_env = "msvc", not(feature = "jemalloc")))]
pub mod default;
#[cfg(any(target_env = "msvc", not(feature = "jemalloc")))]
pub use default::{memory_stats, memory_usage, memory_usage_stats, trim};
+1 -1
View File
@@ -43,7 +43,7 @@ pub fn check(config: &Config) -> Result {
));
}
if cfg!(all(feature = "mimalloc", feature = "jemalloc")) {
if cfg!(all(feature = "mimalloc", feature = "jemalloc", not(target_env = "msvc"))) {
debug_warn!(
"mimalloc and jemalloc compile-time features are both enabled, this causes jemalloc \
to be used."