Skip to content

Commit

Permalink
Use free/malloc in Final build until the Toshi memory system is imple…
Browse files Browse the repository at this point in the history
…mented
  • Loading branch information
AdventureT committed Dec 2, 2023
1 parent aa77a58 commit 9c2a581
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Toshi/Source/TKernel/TMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ TMemory::MemBlock* __stdcall TMemory::GetGlobalBlock()

TPVOID TMemory::Alloc(TUINT a_uiSize, TUINT a_uiAlignment, MemBlock* a_pMemBlock, TPCHAR a_pBuffer, TINT a_iUnk3)
{
// Let's just use malloc until i implemented this
return malloc(a_uiSize);
TMutexLock lock;
Initialise();
lock.Create(g_pMutex);
Expand All @@ -49,6 +51,9 @@ TPVOID TMemory::Alloc(TUINT a_uiSize, TUINT a_uiAlignment, MemBlock* a_pMemBlock

TBOOL TMemory::Free(TPVOID a_pMem)
{
// Let's just use free until i implemented this
free(a_pMem);
return TTRUE;
TMutexLock lock;
Initialise();
lock.Create(g_pMutex);
Expand Down

0 comments on commit 9c2a581

Please sign in to comment.