Improved OEPal integration with the new snmalloc architecture (#346)

* Improved OEPal integration with the new snmalloc architecture

* Applied PR feedback
This commit is contained in:
Istvan Haller
2021-07-15 15:06:47 +01:00
committed by GitHub
parent 39c2df0b56
commit d0ecba5280
5 changed files with 27 additions and 53 deletions

View File

@@ -11,20 +11,21 @@ namespace snmalloc
/**
* A single fixed address range allocator configuration
*/
template<SNMALLOC_CONCEPT(ConceptPAL) PAL>
class FixedGlobals : public CommonConfig
{
public:
using Backend = BackendAllocator<PALNoAlloc<Pal>, true>;
using Backend = BackendAllocator<PAL, true>;
private:
inline static Backend::GlobalState backend_state;
inline static typename Backend::GlobalState backend_state;
inline static ChunkAllocatorState slab_allocator_state;
inline static PoolState<CoreAllocator<FixedGlobals>> alloc_pool;
public:
static Backend::GlobalState& get_backend_state()
static typename Backend::GlobalState& get_backend_state()
{
return backend_state;
}