Wwise SDK
_ak_memory_mgr_8h_source
版本
menu_open
link
Wwise SDK 2022.1.12
|
AkMemoryMgr.h
浏览该文件的文档.
73 };
110 AkUInt64 uReserved; ///< Total reserved memory. (Used and unused). Will return 0 if the reserved memory is not traceable.
111 AkUInt64 uMax; ///< Maximum total allocation size, specified in the initialization settings through uMemAllocationSizeLimit. Will be 0 if no limit was set.
119 /// \warning This function is not thread-safe. It should not be called at the same time as MemoryMgr::Init or MemoryMgr::Term.
127 /// \warning This function is not thread-safe. It is not valid to allocate memory or otherwise interact with the memory manager during or after this call.
132 /// Performs whatever steps are required to initialize a thread for use with the memory manager.
134 /// The default implementation of the memory manager performs thread initialization automatically and therefore this call is optional.
135 /// For implementations where the cost of automatically initializing a thread for use with an allocator would be prohibitively expensive
136 /// this call allows you to perform the initialization once during, for example, thread creation.
142 /// The default implementation of the memory manager requires that all threads that interact with the memory manager call this function prior
143 /// to either their termination or the termination of the memory manager. Threads not created by the sound engine itself will not have this
145 /// Take care to call this function for any thread, not owned by wwise, that may have interacted with the memory manager. For example job system workers.
152 /// so that any thread-local state can be cleaned up in order to return memory for other systems to use.
153 /// For example, this can be used to return thread-local heaps to global stores or to finalize other deferred operations.
155 /// Therefore, unlike TermForThread, this is not expected to be called in all scenarios by Wwise.
156 /// It is also recommended to be called by game engine integrations in any worker threads that run Wwise jobs.
170 /// \return A pointer to the start of the allocated memory (NULL if the allocation could not be completed)
182 /// \return A pointer to the start of the allocated memory (NULL if the allocation could not be completed)
192 /// \return A pointer to the start of the reallocated memory (NULL if the allocation could not be completed)
205 /// \return A pointer to the start of the reallocated memory (NULL if the allocation could not be completed)
216 /// \return A pointer to the start of the reallocated memory (NULL if the allocation could not be completed)
230 /// \return A pointer to the start of the reallocated memory (NULL if the allocation could not be completed)
250 /// \return A pointer to the start of the allocated memory (NULL if the allocation could not be completed)
263 /// \return A pointer to the start of the allocated memory (NULL if the allocation could not be completed)
279 /// \note Be aware of the potentially incoherent nature of reporting such information during concurrent modification by multiple threads.
286 /// \note Be aware of the potentially incoherent nature of reporting such information during concurrent modification by multiple threads.
292 /// \note Not implementing this will result in the Soundbank tab of the Wwise Profiler to show 0 bytes for memory usage.
297 /// \return The amount of memory allocated by this thread since StartProfileThreadUsage was called.
298 /// \note Not implementing this will result in the Soundbank tab of the Wwise Profiler to show 0 bytes for memory usage.
@ AkMemID_Processing
Anything tied to instancing and processing of the DSP graph.
Definition: AkMemoryMgr.h:52
AKSOUNDENGINE_API void DumpToFile(const AkOSChar *pszFilename)
AKSOUNDENGINE_API void TermForThread()
AKSOUNDENGINE_API void * dRealloc(AkMemPoolId in_poolId, void *in_pAlloc, size_t in_uSize, const char *in_pszFile, AkUInt32 in_uLine)
AkUInt64 uDeviceUsed
Total device memory used including all categories (in bytes)
Definition: AkMemoryMgr.h:109
AKSOUNDENGINE_API void * dMalloc(AkMemPoolId in_poolId, size_t in_uSize, const char *in_pszFile, AkUInt32 in_uLine)
@ AkMemID_Object
Generic placeholder for allocations tied to the Wwise project.
Definition: AkMemoryMgr.h:47
AKSOUNDENGINE_API void * dMalign(AkMemPoolId in_poolId, size_t in_uSize, AkUInt32 in_uAlignment, const char *in_pszFile, AkUInt32 in_uLine)
AKSOUNDENGINE_API void Free(AkMemPoolId in_poolId, void *in_pMemAddress)
AKSOUNDENGINE_API void * Malloc(AkMemPoolId in_poolId, size_t in_uSize)
AKSOUNDENGINE_API void TrimForThread()
AKSOUNDENGINE_API void Term()
AKSOUNDENGINE_API void GetGlobalStats(GlobalStats &out_stats)
AKSOUNDENGINE_API void InitForThread()
AkUInt64 uReserved
Total reserved memory. (Used and unused). Will return 0 if the reserved memory is not traceable.
Definition: AkMemoryMgr.h:110
AkUInt64 uMax
Maximum total allocation size, specified in the initialization settings through uMemAllocationSizeLim...
Definition: AkMemoryMgr.h:111
AKSOUNDENGINE_API void * dReallocAligned(AkMemPoolId in_poolId, void *in_pAlloc, size_t in_uSize, AkUInt32 in_uAlignment, const char *in_pszFile, AkUInt32 in_uLine)
AKSOUNDENGINE_API void * Malign(AkMemPoolId in_poolId, size_t in_uSize, AkUInt32 in_uAlignment)
Definition: AkModule.h:155
AKSOUNDENGINE_API void StartProfileThreadUsage()
AKSOUNDENGINE_API void * Realloc(AkMemPoolId in_poolId, void *in_pAlloc, size_t in_uSize)
AKSOUNDENGINE_API AkUInt64 StopProfileThreadUsage()
Definition: AkMemoryMgr.h:90
Definition: AkMemoryMgr.h:107
AKSOUNDENGINE_API void GetCategoryStats(AkMemPoolId in_poolId, CategoryStats &out_poolStats)
AKSOUNDENGINE_API bool IsInitialized()
AKSOUNDENGINE_API void * ReallocAligned(AkMemPoolId in_poolId, void *in_pAlloc, size_t in_uSize, AkUInt32 in_uAlignment)