NFC: Feed Pagemap its primitive allocator as template arg

This will let us use Pagemaps further down the dependency stack (specifically,
we're going to want a Pagemap inside the AddressSpaceManager) by letting us
manually tie the knot rather than rely on GlobalVirtual and
default_memory_provider() being defined by the time we want a Pagemap.
This commit is contained in:
Nathaniel Filardo
2020-11-20 02:08:23 +00:00
committed by Matthew Parkinson
parent 83b72722cf
commit 263e9562c0
4 changed files with 29 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ using namespace snmalloc;
using T = size_t;
static constexpr size_t GRANULARITY_BITS = 9;
static constexpr T PRIME = 251;
Pagemap<GRANULARITY_BITS, T, 0> pagemap_test;
Pagemap<GRANULARITY_BITS, T, 0, DefaultPrimAlloc> pagemap_test;
int main(int argc, char** argv)
{