31 #ifndef _AKMEMORYMGR_H_
32 #define _AKMEMORYMGR_H_
34 #include <AK/SoundEngine/Common/AkTypes.h>
35 #include <AK/SoundEngine/Common/AkSoundEngineExport.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)
119 AK_EXTERNAPIFUNC(
void,
Term )();
133 void * in_pMemAddress,
134 AkUInt32 in_uMemSize,
135 AkUInt32 in_uBlockSize,
136 AkUInt32 in_eAttributes,
137 AkUInt32 in_uBlockAlign = 0
142 #ifdef AK_SUPPORT_WCHAR
148 AkMemPoolId in_poolId,
149 const wchar_t* in_pszPoolName
151 #endif //AK_SUPPORT_WCHAR
158 AkMemPoolId in_poolId,
159 const char* in_pszPoolName
167 AkMemPoolId in_poolId
177 AkMemPoolId in_poolId,
186 AkMemPoolId in_poolId
194 AkMemPoolId in_poolId,
206 AkMemPoolId in_poolId,
228 AkMemPoolId in_poolId
236 AkMemPoolId in_poolId
245 #if defined (AK_MEMDEBUG)
250 AK_EXTERNAPIFUNC(
void *, dMalloc )(
251 AkMemPoolId in_poolId,
253 const char *in_pszFile,
262 AkMemPoolId in_poolId,
271 AkMemPoolId in_poolId,
280 AK_EXTERNAPIFUNC( AKRESULT,
Free )(
281 AkMemPoolId in_poolId,
282 void * in_pMemAddress
285 #if defined (AK_MEMDEBUG)
291 AK_EXTERNAPIFUNC(
void *, dMalign )(
292 AkMemPoolId in_poolId,
294 AkUInt32 in_uAlignment,
295 const char* in_pszFile,
306 AkMemPoolId in_poolId,
308 AkUInt32 in_uAlignment
318 AkMemPoolId in_poolId,
319 void * in_pMemAddress
338 AkMemPoolId in_poolId
347 AkMemPoolId in_poolId,
348 void * in_pMemAddress
359 AkMemPoolId in_poolId
365 AkMemPoolId in_PoolId
372 AkMemPoolId in_PoolId
384 #if defined (AK_MEMDEBUG)
387 AK_EXTERNAPIFUNC(
void, DumpToFile) (
const char* strFileName =
"AkMemDump.txt");
393 #endif // _AKMEMORYMGR_H_
AKSOUNDENGINE_API AkOSChar * GetPoolName(AkMemPoolId in_poolId)
AkUInt32 uUsed
Used memory (in bytes)
AKSOUNDENGINE_API AkUInt32 StopProfileThreadUsage(AkMemPoolId in_PoolId)
AKSOUNDENGINE_API AKRESULT Falign(AkMemPoolId in_poolId, void *in_pMemAddress)
AKSOUNDENGINE_API AKRESULT SetPoolName(AkMemPoolId in_poolId, const char *in_pszPoolName)
AKSOUNDENGINE_API AkMemPoolId CreatePool(void *in_pMemAddress, AkUInt32 in_uMemSize, AkUInt32 in_uBlockSize, AkUInt32 in_eAttributes, AkUInt32 in_uBlockAlign=0)
AKSOUNDENGINE_API AKRESULT CheckPoolId(AkMemPoolId in_poolId)
@ CheckOverwriteAtFree
Performs a for buffer overflow when an allocation is freed.
AKSOUNDENGINE_API void * Malloc(AkMemPoolId in_poolId, size_t in_uSize)
AKSOUNDENGINE_API AKRESULT Free(AkMemPoolId in_poolId, void *in_pMemAddress)
AKSOUNDENGINE_API AKRESULT GetPoolStats(AkMemPoolId in_poolId, PoolStats &out_stats)
AKSOUNDENGINE_API void Term()
AKSOUNDENGINE_API void GetPoolMemoryUsed(AkMemPoolId in_poolId, PoolMemInfo &out_memInfo)
AKSOUNDENGINE_API void CheckForOverwrite(AkUInt32 in_uPoolID)
AKSOUNDENGINE_API AKRESULT SetMonitoring(AkMemPoolId in_poolId, bool in_bDoMonitor)
AKSOUNDENGINE_API void * Malign(AkMemPoolId in_poolId, size_t in_uSize, AkUInt32 in_uAlignment)
AkUInt32 uReserved
Reserved memory (in bytes)
AKSOUNDENGINE_API AkMemPoolAttributes GetPoolAttributes(AkMemPoolId in_poolId)
AkUInt32 uFrees
Number of Free calls since initialization
AkUInt32 uAllocs
Number of Alloc calls since initialization
AKSOUNDENGINE_API AkUInt32 GetBlockSize(AkMemPoolId in_poolId)
AKSOUNDENGINE_API void * Realloc(AkMemPoolId in_poolId, void *in_pAlloc, size_t in_uSize)
AkUInt32 uMaxFreeBlock
Size of biggest free block (in bytes)
AKSOUNDENGINE_API AkInt32 GetNumPools()
AKSOUNDENGINE_API void * GetBlock(AkMemPoolId in_poolId)
@ CheckOverwritePerFrame
Performs a check for buffer overflow once per audio frame
AkUInt32 uPeakUsed
Peak used memory (in bytes)
AkUInt32 uReserved
Reserved memory (in bytes)
AKSOUNDENGINE_API bool IsInitialized()
AKSOUNDENGINE_API AKRESULT DestroyPool(AkMemPoolId in_poolId)
AkUInt32 uUsed
Used memory (in bytes)
AKSOUNDENGINE_API void StartProfileThreadUsage(AkMemPoolId in_PoolId)
AKSOUNDENGINE_API AKRESULT ReleaseBlock(AkMemPoolId in_poolId, void *in_pMemAddress)
@ CheckOverwritePerVoice
Performs a check for buffer overflow once per audio voice
AKSOUNDENGINE_API AkInt32 GetMaxPools()
지원이 필요하신가요?
질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!
지원 페이지를 방문해 주세요
작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.
프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.
Wwise를 시작해 보세요