Plumb LocalState ptrs through to Pagemap accessors
David points out that we might not have a static way to get at the pagemap, so it is potentially useful to pass pointers to state objects down from the Allocators.
This commit is contained in:
committed by
Nathaniel Wesley Filardo
parent
3710e351fe
commit
3af9d35099
@@ -29,7 +29,7 @@ int main()
|
||||
std::cout << "Allocated region " << oe_base << " - "
|
||||
<< pointer_offset(oe_base, size) << std::endl;
|
||||
|
||||
CustomGlobals::init(oe_base, size);
|
||||
CustomGlobals::init(nullptr, oe_base, size);
|
||||
FixedAlloc a;
|
||||
|
||||
size_t object_size = 128;
|
||||
|
||||
@@ -19,5 +19,6 @@ namespace snmalloc
|
||||
|
||||
extern "C" void oe_allocator_init(void* base, void* end)
|
||||
{
|
||||
snmalloc::CustomGlobals::init(base, address_cast(end) - address_cast(base));
|
||||
snmalloc::CustomGlobals::init(
|
||||
nullptr, base, address_cast(end) - address_cast(base));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user