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,14 +259,12 @@ pub enum PoolingAllocationStrategy {
} }
impl Default for PoolingAllocationStrategy { impl Default for PoolingAllocationStrategy {
#[cfg(feature = "memfd-allocator")]
fn default() -> Self { fn default() -> Self {
Self::ReuseAffinity if cfg!(memfd) {
} Self::ReuseAffinity
} else {
#[cfg(not(feature = "memfd-allocator"))] Self::NextAvailable
fn default() -> Self { }
Self::NextAvailable
} }
} }