31 #ifndef _AKMEMORYMGR_H_
32 #define _AKMEMORYMGR_H_
39 #define AK_MAX_MEM_POOL_NAME_SIZE 64
42 #define AK_SETPOOLNAME( _poolid, _name ) \
43 if( AK_INVALID_POOL_ID != _poolid ) \
45 AK::MemoryMgr::SetPoolName( _poolid, _name ); \
50 #ifdef MSTC_SYSTEMATIC_MEMORY_STRESS
55 #define AK_SETPOOLNAME(_poolid,_name)
133 void * in_pMemAddress,
142 #ifdef AK_SUPPORT_WCHAR
149 const wchar_t* in_pszPoolName
151 #endif //AK_SUPPORT_WCHAR
159 const char* in_pszPoolName
207 PoolMemInfo& out_memInfo
245 #if defined (AK_MEMDEBUG)
253 const char *in_pszFile,
282 void * in_pMemAddress
285 #if defined (AK_MEMDEBUG)
295 const char* in_pszFile,
319 void * in_pMemAddress
348 void * in_pMemAddress
384 #if defined (AK_MEMDEBUG)
387 AK_EXTERNAPIFUNC(
void, DumpToFile) (
const char* strFileName =
"AkMemDump.txt");
393 #endif // _AKMEMORYMGR_H_
AkUInt32 uReserved
Reserved memory (in bytes)
bool __cdecl IsInitialized()
AKRESULT __cdecl Free(AkMemPoolId in_poolId, void *in_pMemAddress)
AKRESULT __cdecl SetMonitoring(AkMemPoolId in_poolId, bool in_bDoMonitor)
void *__cdecl GetBlock(AkMemPoolId in_poolId)
AkUInt32 uUsed
Used memory (in bytes)
AKRESULT
Standard function call result.
#define AK_EXTERNAPIFUNC(__TYPE__, __NAME__)
AkMemPoolId __cdecl CreatePool(void *in_pMemAddress, AkUInt32 in_uMemSize, AkUInt32 in_uBlockSize, AkUInt32 in_eAttributes, AkUInt32 in_uBlockAlign=0)
AKRESULT __cdecl DestroyPool(AkMemPoolId in_poolId)
Performs a check for buffer overflow once per audio frame
AkUInt32 uMaxFreeBlock
Size of biggest free block (in bytes)
void __cdecl StartProfileThreadUsage(AkMemPoolId in_PoolId)
AkUInt32 uReserved
Reserved memory (in bytes)
AkUInt32 uPeakUsed
Peak used memory (in bytes)
void __cdecl GetPoolMemoryUsed(AkMemPoolId in_poolId, PoolMemInfo &out_memInfo)
AkUInt32 uFrees
Number of Free calls since initialization
AkUInt32 __cdecl GetBlockSize(AkMemPoolId in_poolId)
AKRESULT __cdecl Falign(AkMemPoolId in_poolId, void *in_pMemAddress)
void *__cdecl Malign(AkMemPoolId in_poolId, size_t in_uSize, AkUInt32 in_uAlignment)
AKRESULT __cdecl CheckPoolId(AkMemPoolId in_poolId)
AKRESULT __cdecl ReleaseBlock(AkMemPoolId in_poolId, void *in_pMemAddress)
AkMemPoolAttributes __cdecl GetPoolAttributes(AkMemPoolId in_poolId)
AkUInt32 __cdecl StopProfileThreadUsage(AkMemPoolId in_PoolId)
void *__cdecl Malloc(AkMemPoolId in_poolId, size_t in_uSize)
AKRESULT __cdecl GetPoolStats(AkMemPoolId in_poolId, PoolStats &out_stats)
AKRESULT __cdecl SetPoolName(AkMemPoolId in_poolId, const char *in_pszPoolName)
void __cdecl CheckForOverwrite(AkUInt32 in_uPoolID)
AkOSChar *__cdecl GetPoolName(AkMemPoolId in_poolId)
AkInt32 __cdecl GetNumPools()
Performs a for buffer overflow when an allocation is freed.
AkUInt32 uUsed
Used memory (in bytes)
AkUInt32 uAllocs
Number of Alloc calls since initialization
void *__cdecl Realloc(AkMemPoolId in_poolId, void *in_pAlloc, size_t in_uSize)
AkInt32 AkMemPoolId
Memory pool ID
Performs a check for buffer overflow once per audio voice
AkInt32 __cdecl GetMaxPools()