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:
Nathaniel Filardo
2019-11-21 15:23:35 +00:00
parent b889f11d04
commit d5b478ecb3
6 changed files with 255 additions and 235 deletions

View File

@@ -19,7 +19,7 @@ namespace snmalloc
* required. This avoids a branch on the fast path.
*/
inline Alloc GlobalPlaceHolder(
default_memory_provider, SNMALLOC_DEFAULT_PAGEMAP(), nullptr, true);
default_memory_provider, SNMALLOC_DEFAULT_CHUNKMAP(), nullptr, true);
#ifdef SNMALLOC_EXTERNAL_THREAD_ALLOC
/**