OpenBarnyard
 
Loading...
Searching...
No Matches
TMemory_Win.cpp
Go to the documentation of this file.
1#include "ToshiPCH.h"
2
3#ifndef TMEMORY_USE_DLMALLOC
4
5# include "Core/TMemory.h"
6# include "Thread/TMutex.h"
7# include "Thread/TMutexLock.h"
8
9# include <windows.h>
10
12
13void* TMemory::SysAlloc( TSIZE a_uiSize )
14{
15 void* pMem = GlobalAlloc( 64, a_uiSize );
16 TVALIDPTR( pMem );
17
18 return pMem;
19}
20
21void TMemory::SysFree( void* a_pMem )
22{
23 TASSERT( TNULL != a_pMem );
24 GlobalFree( a_pMem );
25}
26
28
29#endif // !TMEMORY_USE_DLMALLOC
Core memory management system for the Toshi engine.
#define TASSERT(X,...)
Definition Defines.h:138
#define TOSHI_NAMESPACE_START
Definition Defines.h:47
#define TOSHI_NAMESPACE_END
Definition Defines.h:50
#define TVALIDPTR(PTR)
Definition Defines.h:139
size_t TSIZE
Definition Typedefs.h:9
#define TNULL
Definition Typedefs.h:23
void * SysAlloc(TSIZE a_uiSize)
Allocates memory from the system heap.
void SysFree(void *a_pMem)
Frees memory back to the system heap.