mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-23 08:57:35 +00:00
fix(alloc): Restore not(target_env = "msvc") cfg gates and gate default module
This commit is contained in:
2 files changed
+10
-7
No files matched your search
@@ -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};
|
||||
@@ -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."
|
||||
|
||||
Reference in new issue
Block a user