mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-01-01 04:31:54 +01:00
26 lines
493 B
C++
26 lines
493 B
C++
|
#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);
|
||
|
}
|