Moved SharedStateHandle to Pool class instead of methods since all of them use it
This commit is contained in:
@@ -380,8 +380,7 @@ namespace snmalloc
|
||||
// Initialise the global allocator structures
|
||||
ensure_init();
|
||||
// Grab an allocator for this thread.
|
||||
init(Pool<CoreAlloc>::template acquire<SharedStateHandle>(
|
||||
&(this->local_cache)));
|
||||
init(Pool<CoreAlloc, SharedStateHandle>::acquire(&(this->local_cache)));
|
||||
}
|
||||
|
||||
// Return all state in the fast allocator and release the underlying
|
||||
@@ -403,7 +402,7 @@ namespace snmalloc
|
||||
// Return underlying allocator to the system.
|
||||
if constexpr (SharedStateHandle::Options.CoreAllocOwnsLocalState)
|
||||
{
|
||||
Pool<CoreAlloc>::template release<SharedStateHandle>(core_alloc);
|
||||
Pool<CoreAlloc, SharedStateHandle>::release(core_alloc);
|
||||
}
|
||||
|
||||
// Set up thread local allocator to look like
|
||||
|
||||
Reference in New Issue
Block a user