@@ -57,7 +57,7 @@ namespace snmalloc
5757 // global state of the allocator. This is currently stored in the memory
5858 // provider, so we add this in.
5959 template <SNMALLOC_CONCEPT(ConceptPAL) PAL>
60- class MemoryProviderStateMixin : public PalNotificationObject , public PAL
60+ class MemoryProviderStateMixin : public PalNotificationObject
6161 {
6262 /* *
6363 * Simple flag for checking if another instance of lazy-decommit is
@@ -76,6 +76,8 @@ namespace snmalloc
7676 std::atomic<size_t > peak_memory_used_bytes{0 };
7777
7878 public:
79+ using Pal = PAL;
80+
7981 /* *
8082 * Memory current available in large_stacks
8183 */
@@ -258,7 +260,7 @@ namespace snmalloc
258260 p = memory_provider.template reserve <false >(large_class);
259261 if (p == nullptr )
260262 return nullptr ;
261- memory_provider. template notify_using <zero_mem>(p, rsize);
263+ MemoryProvider::Pal:: template notify_using<zero_mem>(p, rsize);
262264 }
263265 else
264266 {
@@ -276,19 +278,19 @@ namespace snmalloc
276278 // The first page is already in "use" for the stack element,
277279 // this will need zeroing for a YesZero call.
278280 if constexpr (zero_mem == YesZero)
279- memory_provider. template zero <true >(p, OS_PAGE_SIZE);
281+ MemoryProvider::Pal:: template zero<true >(p, OS_PAGE_SIZE);
280282
281283 // Notify we are using the rest of the allocation.
282284 // Passing zero_mem ensures the PAL provides zeroed pages if
283285 // required.
284- memory_provider. template notify_using <zero_mem>(
286+ MemoryProvider::Pal:: template notify_using<zero_mem>(
285287 pointer_offset (p, OS_PAGE_SIZE), rsize - OS_PAGE_SIZE);
286288 }
287289 else
288290 {
289291 // This is a superslab that has not been decommitted.
290292 if constexpr (zero_mem == YesZero)
291- memory_provider. template zero <true >(
293+ MemoryProvider::Pal:: template zero<true >(
292294 p, bits::align_up (size, OS_PAGE_SIZE));
293295 else
294296 UNUSED (size);
@@ -304,7 +306,7 @@ namespace snmalloc
304306 if constexpr (decommit_strategy == DecommitSuperLazy)
305307 {
306308 static_assert (
307- pal_supports<LowMemoryNotification, MemoryProvider>,
309+ pal_supports<LowMemoryNotification, typename MemoryProvider::Pal >,
308310 " A lazy decommit strategy cannot be implemented on platforms "
309311 " without low memory notifications" );
310312 }
@@ -316,7 +318,7 @@ namespace snmalloc
316318 (decommit_strategy != DecommitNone) &&
317319 (large_class != 0 || decommit_strategy == DecommitSuper))
318320 {
319- memory_provider. notify_not_using (
321+ MemoryProvider::Pal:: notify_not_using (
320322 pointer_offset (p, OS_PAGE_SIZE), rsize - OS_PAGE_SIZE);
321323 }
322324
0 commit comments