MemoryProviderStateMixin is not a PAL

This commit is contained in:
Nathaniel Filardo
2020-09-07 11:57:38 +01:00
committed by Matthew Parkinson
parent d79a8184af
commit 1e8d0bd743
5 changed files with 26 additions and 27 deletions

View File

@@ -36,12 +36,9 @@ namespace snmalloc
* Returns the link as the allocation, and places the free list into the
* `fast_free_list` for further allocations.
*/
template<ZeroMem zero_mem, typename MemoryProvider>
SNMALLOC_FAST_PATH void* alloc(
SlabList& sl,
FreeListHead& fast_free_list,
size_t rsize,
MemoryProvider& memory_provider)
template<ZeroMem zero_mem, SNMALLOC_CONCEPT(ConceptPAL) PAL>
SNMALLOC_FAST_PATH void*
alloc(SlabList& sl, FreeListHead& fast_free_list, size_t rsize)
{
// Read the head from the metadata stored in the superslab.
Metaslab& meta = get_meta();
@@ -73,9 +70,9 @@ namespace snmalloc
if constexpr (zero_mem == YesZero)
{
if (rsize < PAGE_ALIGNED_SIZE)
memory_provider.zero(p, rsize);
PAL::zero(p, rsize);
else
memory_provider.template zero<true>(p, rsize);
PAL::template zero<true>(p, rsize);
}
else
{