Improved the ability to extend GlobalState for custom Backend implementations

This commit is contained in:
Istvan Haller
2021-08-05 11:14:43 +01:00
committed by Matthew Parkinson
parent 81bf341732
commit 2ef1eea3ba

View File

@@ -11,7 +11,10 @@ namespace snmalloc
* This class implements the standard backend for handling allocations.
* It abstracts page table management and address space management.
*/
template<SNMALLOC_CONCEPT(ConceptPAL) PAL, bool fixed_range>
template<
SNMALLOC_CONCEPT(ConceptPAL) PAL,
bool fixed_range,
typename PageMapEntry = MetaEntry>
class BackendAllocator
{
// Size of local address space requests. Currently aimed at 2MiB large
@@ -64,9 +67,10 @@ namespace snmalloc
{
friend BackendAllocator;
protected:
AddressSpaceManager<PAL> address_space;
FlatPagemap<MIN_CHUNK_BITS, MetaEntry, PAL, fixed_range> pagemap;
FlatPagemap<MIN_CHUNK_BITS, PageMapEntry, PAL, fixed_range> pagemap;
public:
template<bool fixed_range_ = fixed_range>