Cemu/src/Common/SysAllocator.cpp

25 lines
492 B
C++
Raw Normal View History

2022-08-22 22:21:23 +02:00
#include "SysAllocator.h"
void SysAllocatorContainer::Initialize()
{
for (SysAllocatorBase* sysAlloc : m_sysAllocList)
{
sysAlloc->Initialize();
}
}
void SysAllocatorContainer::PushSysAllocator(SysAllocatorBase* base)
{
m_sysAllocList.push_back(base);
}
SysAllocatorContainer& SysAllocatorContainer::GetInstance()
{
static SysAllocatorContainer s_instance;
return s_instance;
}
SysAllocatorBase::SysAllocatorBase()
{
SysAllocatorContainer::GetInstance().PushSysAllocator(this);
}