diff --git a/crates/runtime/src/instance/allocator/pooling.rs b/crates/runtime/src/instance/allocator/pooling.rs index bab7a47f3f..46d96ecfa9 100644 --- a/crates/runtime/src/instance/allocator/pooling.rs +++ b/crates/runtime/src/instance/allocator/pooling.rs @@ -259,14 +259,12 @@ pub enum PoolingAllocationStrategy { } impl Default for PoolingAllocationStrategy { - #[cfg(feature = "memfd-allocator")] fn default() -> Self { - Self::ReuseAffinity - } - - #[cfg(not(feature = "memfd-allocator"))] - fn default() -> Self { - Self::NextAvailable + if cfg!(memfd) { + Self::ReuseAffinity + } else { + Self::NextAvailable + } } }