1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-18 06:17:45 +00:00
re3/src/leeds/base/memoryManager.h
2021-01-09 13:24:09 +02:00

39 lines
733 B
C++

#pragma once
namespace base
{
class cMemoryManager
{
public:
cMemoryManager();
void* Allocate(uint32 size);
void* AllocateAligned(uint32 size);
void* Realloc(void* buf, uint32 newSize, bool unk);
void Free(void* buf);
bool IsFree(void* buf);
};
class cMainMemoryManager : public cMemoryManager
{
static cMainMemoryManager* m_pInstance;
static void Init(void*, uint32);
public:
cMainMemoryManager();
static cMainMemoryManager *Instance()
{
static cMainMemoryManager instance;
return &instance;
}
};
class cMemoryBlock
{
// TODO
};
}
void* operator new(size_t size);
void* operator new[](size_t size);
void operator delete(void* buf) noexcept;
void operator delete[](void* buf) noexcept;