Pooling allocator: Default for allocation policy should use memfd feature, not memfd-allocator. (#3777)

Thanks to @peterheune for noticing this!
This commit is contained in:
Chris Fallin
2022-02-08 10:29:45 -08:00
committed by GitHub
parent fbeb806b50
commit 4f01711d42

View File

@@ -259,15 +259,13 @@ pub enum PoolingAllocationStrategy {
} }
impl Default for PoolingAllocationStrategy { impl Default for PoolingAllocationStrategy {
#[cfg(feature = "memfd-allocator")]
fn default() -> Self { fn default() -> Self {
if cfg!(memfd) {
Self::ReuseAffinity Self::ReuseAffinity
} } else {
#[cfg(not(feature = "memfd-allocator"))]
fn default() -> Self {
Self::NextAvailable Self::NextAvailable
} }
}
} }
/// Represents a pool of maximal `Instance` structures. /// Represents a pool of maximal `Instance` structures.