metaforce/Runtime/CGameAllocator.cpp

100 lines
2.0 KiB
C++
Raw Normal View History

2015-08-17 05:26:58 +00:00
#include "CGameAllocator.hpp"
namespace Retro
{
LogVisor::LogModule AllocLog("CGameAllocator");
2015-08-23 23:58:07 +00:00
CGameAllocator::SGameMemInfo* CGameAllocator::FindFreeBlock(u32)
{
2015-08-31 03:44:42 +00:00
return nullptr;
2015-08-23 23:58:07 +00:00
}
CGameAllocator::SGameMemInfo* CGameAllocator::FindFreeBlockFromTopOfHeap(u32)
{
2015-08-31 03:44:42 +00:00
return nullptr;
2015-08-23 23:58:07 +00:00
}
u32 CGameAllocator::FixupAllocPtrs(SGameMemInfo*, u32, u32, EHint, const CCallStack&)
{
2015-08-31 03:44:42 +00:00
return 0;
2015-08-23 23:58:07 +00:00
}
void CGameAllocator::UpdateAllocDebugStats(u32, u32, u32)
{
}
bool CGameAllocator::FreeNormalAllocation(void*)
2015-08-17 05:26:58 +00:00
{
2015-08-31 03:44:42 +00:00
return false;
2015-08-23 23:58:07 +00:00
}
u32 CGameAllocator::GetFreeBinEntryForSize(u32)
{
2015-08-31 03:44:42 +00:00
return 0;
2015-08-23 23:58:07 +00:00
}
void CGameAllocator::AddFreeEntryToFreeList(SGameMemInfo*)
{
}
void CGameAllocator::RemoveFreeEntryFromFreeList(SGameMemInfo*)
{
}
void CGameAllocator::DumpAllocations() const
{
}
u32 CGameAllocator::GetLargestFreeChunk() const
{
2015-08-31 03:44:42 +00:00
return 0;
2015-08-23 23:58:07 +00:00
}
CGameAllocator::SGameMemInfo* CGameAllocator::GetMemInfoFromBlockPtr(void* ptr)
{
return reinterpret_cast<SGameMemInfo*>(reinterpret_cast<u8*>(ptr) - 32);
2015-08-17 05:26:58 +00:00
}
2015-08-28 00:11:31 +00:00
bool CGameAllocator::Initialize()
2015-08-23 23:58:07 +00:00
{
2015-08-31 03:44:42 +00:00
return false;
2015-08-23 23:58:07 +00:00
}
2015-08-17 05:26:58 +00:00
void CGameAllocator::Shutdown()
{
}
void* CGameAllocator::Alloc(size_t sz, EHint, EScope, EType, const CCallStack&)
2015-08-23 23:58:07 +00:00
{
2015-11-26 07:38:56 +00:00
//AllocLog.report(LogVisor::Warning, _S("Remind Phil to reimplement Alloc!!!!"));
return malloc(sz);
2015-08-23 23:58:07 +00:00
}
void CGameAllocator::Free(void* ptr)
2015-08-23 23:58:07 +00:00
{
free(ptr);
2015-08-23 23:58:07 +00:00
}
void CGameAllocator::ReleaseAll()
{
}
void* CGameAllocator::AllocSecondary(size_t sz, EHint, EScope, EType, const CCallStack&)
2015-08-23 23:58:07 +00:00
{
return malloc(sz);
2015-08-23 23:58:07 +00:00
}
void CGameAllocator::FreeSecondary(void*)
{
}
void CGameAllocator::ReleaseAllSecondary()
{
}
void CGameAllocator::SetOutOfMemoryCallback(const TOutOfMemoryCallback cb, void* ctx)
{
x58_oomCb = cb;
x5c_oomCtx = ctx;
}
int CGameAllocator::EnumAllocations(const TAllocationVisitCallback, void*, bool) const
{
2015-08-31 03:44:42 +00:00
return 0;
2015-08-23 23:58:07 +00:00
}
CGameAllocator::SAllocInfo CGameAllocator::GetAllocInfo(void*) const
{
2015-08-31 03:44:42 +00:00
return CGameAllocator::SAllocInfo();
2015-08-23 23:58:07 +00:00
}
void CGameAllocator::OffsetFakeStatics(int)
{
}
CGameAllocator::SMetrics CGameAllocator::GetMetrics() const
{
2015-08-31 03:44:42 +00:00
return CGameAllocator::SMetrics();
2015-08-23 23:58:07 +00:00
}
}