Pooling allocator: Default for allocation policy should use memfd feature, not memfd-allocator.
Thanks to for noticing this!
@@ -259,16 +259,14 @@ pub enum PoolingAllocationStrategy {
}
impl Default for PoolingAllocationStrategy {
- #[cfg(feature = "memfd-allocator")]
fn default() -> Self {
+ if cfg!(memfd) {
Self::ReuseAffinity
- }
-
- #[cfg(not(feature = "memfd-allocator"))]
- fn default() -> Self {
+ } else {
Self::NextAvailable
}
}
+}
/// Represents a pool of maximal `Instance` structures.
///
