Make Secondary Allocator a template parameter (#774)

This refactors the use of the Secondary Allocator, so that out of tree implementations can be used.
This commit is contained in:
Matthew Parkinson
2025-06-30 21:23:07 +01:00
committed by GitHub
parent e600bf1b38
commit 9a3d12a724
9 changed files with 28 additions and 33 deletions

View File

@@ -5,6 +5,7 @@
#include <snmalloc/backend/backend.h>
#include <snmalloc/backend/standard_range.h>
#include <snmalloc/backend_helpers/backend_helpers.h>
#include <snmalloc/mem/secondary/default.h>
#include <snmalloc/snmalloc_core.h>
// Specify type of allocator
@@ -18,6 +19,7 @@ namespace snmalloc
using Pal = DefaultPal;
using PagemapEntry = DefaultPagemapEntry<NoClientMetaDataProvider>;
using ClientMeta = NoClientMetaDataProvider;
using SecondaryAllocator = DefaultSecondaryAllocator;
private:
using ConcretePagemap =

View File

@@ -1,4 +1,3 @@
#include "snmalloc/mem/secondary.h"
#include "test/setup.h"
#include <iostream>

View File

@@ -1,4 +1,3 @@
#include "snmalloc/mem/secondary.h"
#include "test/setup.h"
#include <iostream>