diff --git a/src/pal/pal_concept.h b/src/pal/pal_concept.h index ee926c2..62cdc07 100644 --- a/src/pal/pal_concept.h +++ b/src/pal/pal_concept.h @@ -19,7 +19,7 @@ namespace snmalloc concept ConceptPAL_static_members = requires() { typename std::integral_constant; - typename std::integral_constant; + typename std::integral_constant; }; /** @@ -35,7 +35,7 @@ namespace snmalloc * PALs expose a basic library of memory operations. */ template - concept ConceptPAL_memops = requires(void* vp, size_t sz) + concept ConceptPAL_memops = requires(void* vp, std::size_t sz) { { PAL::notify_not_using(vp, sz) } noexcept -> ConceptSame; @@ -52,17 +52,18 @@ namespace snmalloc * Absent any feature flags, the PAL must support a crude primitive allocator */ template - concept ConceptPAL_reserve_at_least = requires(PAL p, void* vp, size_t sz) + concept ConceptPAL_reserve_at_least = + requires(PAL p, void* vp, std::size_t sz) { { PAL::reserve_at_least(sz) } noexcept - -> ConceptSame>; + -> ConceptSame>; }; /** * Some PALs expose a richer allocator which understands aligned allocations */ template - concept ConceptPAL_reserve_aligned = requires(size_t sz) + concept ConceptPAL_reserve_aligned = requires(std::size_t sz) { { PAL::template reserve_aligned(sz) } noexcept -> ConceptSame; { PAL::template reserve_aligned(sz) } noexcept @@ -90,13 +91,13 @@ namespace snmalloc ConceptPAL_static_members && ConceptPAL_error && ConceptPAL_memops && - (!(PAL::pal_features & LowMemoryNotification) || + (!pal_supports || ConceptPAL_mem_low_notify) && - (!(PAL::pal_features & NoAllocation) && ( - (!!(PAL::pal_features & AlignedAllocation) || - ConceptPAL_reserve_at_least) && - (!(PAL::pal_features & AlignedAllocation) || - ConceptPAL_reserve_aligned))); + (pal_supports || + (pal_supports && + ConceptPAL_reserve_aligned) || + (!pal_supports && + ConceptPAL_reserve_at_least)); } // namespace snmalloc #endif