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:
@@ -213,8 +213,8 @@ extern "C"
|
||||
auto& pm = GlobalPagemap::pagemap();
|
||||
if (config)
|
||||
{
|
||||
*config = &SuperslabPagemap::config;
|
||||
assert(SuperslabPagemap::cast_to_pagemap(&pm, *config) == &pm);
|
||||
*config = &ChunkmapPagemap::config;
|
||||
assert(ChunkmapPagemap::cast_to_pagemap(&pm, *config) == &pm);
|
||||
}
|
||||
return ±
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user