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
@@ -74,7 +74,8 @@ namespace snmalloc
|
||||
size_t allocator_size,
|
||||
typename SharedStateHandle,
|
||||
typename DeallocFun>
|
||||
bool flush(DeallocFun dealloc)
|
||||
bool flush(
|
||||
typename SharedStateHandle::LocalState* local_state, DeallocFun dealloc)
|
||||
{
|
||||
auto& key = entropy.get_free_list_key();
|
||||
|
||||
@@ -92,7 +93,7 @@ namespace snmalloc
|
||||
}
|
||||
|
||||
return remote_dealloc_cache.post<allocator_size, SharedStateHandle>(
|
||||
remote_allocator->trunc_id(), key_global);
|
||||
local_state, remote_allocator->trunc_id(), key_global);
|
||||
}
|
||||
|
||||
template<ZeroMem zero_mem, typename SharedStateHandle, typename Slowpath>
|
||||
|
||||
Reference in New Issue
Block a user