Deconflate "Pagemap" objects
There are two things calling themselves pagemaps: - the src/mem/pagemap.h objects of that name - the SuperslabMap object gets called a PageMap inside the Allocator Rename the latter to chunkmap, with appropriate case and snake, everywhere, and pull it out to its own file (chunkmap.h). The default implementation of a chunkmap is a purely static object, but we nevertheless instantiate it per allocator, so that other implementations can use stateful instances when interposing on the mutation methods. Note that the "get" method, however, must remain static to support the interface required by Allocator objects.
This commit is contained in:
@@ -8,20 +8,20 @@ namespace snmalloc
|
||||
{
|
||||
inline void* lazy_replacement(void*);
|
||||
using Alloc =
|
||||
Allocator<GlobalVirtual, SNMALLOC_DEFAULT_PAGEMAP, true, lazy_replacement>;
|
||||
Allocator<GlobalVirtual, SNMALLOC_DEFAULT_CHUNKMAP, true, lazy_replacement>;
|
||||
|
||||
template<class MemoryProvider>
|
||||
class AllocPool : Pool<
|
||||
Allocator<
|
||||
MemoryProvider,
|
||||
SNMALLOC_DEFAULT_PAGEMAP,
|
||||
SNMALLOC_DEFAULT_CHUNKMAP,
|
||||
true,
|
||||
lazy_replacement>,
|
||||
MemoryProvider>
|
||||
{
|
||||
using Alloc = Allocator<
|
||||
MemoryProvider,
|
||||
SNMALLOC_DEFAULT_PAGEMAP,
|
||||
SNMALLOC_DEFAULT_CHUNKMAP,
|
||||
true,
|
||||
lazy_replacement>;
|
||||
using Parent = Pool<Alloc, MemoryProvider>;
|
||||
|
||||
Reference in New Issue
Block a user