Version

menu_open
Wwise SDK 2023.1.9
AkMemoryMgr.h
Go to the documentation of this file.
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Copyright (c) 2024 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 /// \file
28 /// Memory Manager namespace.
29 
30 #ifndef _AKMEMORYMGR_H_
31 #define _AKMEMORYMGR_H_
32 
33 #if !defined( AK_OPTIMIZED ) && !( defined AK_DISABLE_MEMDEBUG )
34  #ifndef AK_MEMDEBUG
35  #define AK_MEMDEBUG
36  #endif
37 #endif
38 
41 
42 struct AkMemSettings;
43 
44 /// Memory category IDs.
45 enum AkMemID
46 {
47  AkMemID_Object, ///< Generic placeholder for allocations tied to the Wwise project.
48  AkMemID_Event, ///< Events from the Wwise project.
49  AkMemID_Structure, ///< Structures from the Wwise project.
50  AkMemID_Media, ///< Media from the Wwise project.
51  AkMemID_GameObject, ///< Game Objects and related.
52  AkMemID_Processing, ///< Anything tied to instancing and processing of the DSP graph.
53  AkMemID_ProcessingPlugin, ///< Plug-in allocations related to the DSP graph.
54  AkMemID_Streaming, ///< Streaming Manager objects.
55  AkMemID_StreamingIO, ///< Streaming Manager I/O memory.
56  AkMemID_SpatialAudio, ///< Spatial audio.
57  AkMemID_SpatialAudioGeometry, ///< Spatial audio geometry data.
58  AkMemID_SpatialAudioPaths, ///< Spatial audio paths data.
59  AkMemID_GameSim, ///< Game Simulator allocations.
60  AkMemID_MonitorQueue, ///< Monitor Queue.
61  AkMemID_Profiler, ///< Profiler.
62  AkMemID_FilePackage, ///< File packager.
63  AkMemID_SoundEngine, ///< Base sound engine allocations (managers, etc).
64  AkMemID_Integration, ///< Game engine integration allocations.
65  AkMemID_JobMgr, ///< Allocations for Sound Engine jobs and job dependencies.
66  AkMemID_TempAudioRender, ///< Temporary allocations for audio render.
67 
68  AkMemID_NUM, ///< Category count.
69  AkMemID_MASK = 0x1FFFFFFF, ///< Mask for category IDs.
70 
71  AkMemType_Media = 0x20000000, ///< Media memory type bit.
72  AkMemType_Device = 0x40000000, ///< Device memory type bit.
73  AkMemType_NoTrack = 0x80000000 ///< Do not track this allocation.
74 };
75 
76 namespace AK
77 {
78  /// Memory Manager namespace.
79  /// \remarks The functions in this namespace are thread-safe, unless stated otherwise.
80  /// \sa
81  /// - \ref memorymanager
82  namespace MemoryMgr
83  {
84  /// Memory category statistics.
85  /// \remarks These statistics are not collected in the Release configuration of
86  /// the default memory manager implementation.
87  /// \sa
88  /// - AK::MemoryMgr::GetCategoryStats()
89  /// - \ref memorymanager
91  {
92  // Current state
93  AkUInt64 uUsed; ///< Used memory (in bytes)
94 
95  // Statistics
96  AkUInt64 uPeakUsed; ///< Peak used memory (in bytes)
97  AkUInt32 uAllocs; ///< Number of allocation calls since initialization
98  AkUInt32 uFrees; ///< Number of free calls since initialization
99  };
100 
101  /// Memory global statistics.
102  /// \remarks These statistics are not collected in the Release configuration of
103  /// the default memory manager implementation.
104  /// \sa
105  /// - AK::MemoryMgr::GetGlobalStats()
106  /// - \ref memorymanager
107  struct GlobalStats
108  {
109  AkUInt64 uUsed; ///< Total memory used including all categories (in bytes)
110  AkUInt64 uDeviceUsed; ///< Total device memory used including all categories (in bytes)
111  AkUInt64 uReserved; ///< Total reserved memory. (Used and unused). Will return 0 if the reserved memory is not traceable.
112  AkUInt64 uMax; ///< Maximum total allocation size, specified in the initialization settings through uMemAllocationSizeLimit. Will be 0 if no limit was set.
113  };
114 
115  ////////////////////////////////////////////////////////////////////////
116  /// @name Initialization
117  //@{
118 
119  /// Query whether the Memory Manager has been sucessfully initialized.
120  /// \warning This function is not thread-safe. It should not be called at the same time as MemoryMgr::Init or MemoryMgr::Term.
121  /// \return True if the Memory Manager is initialized, False otherwise
122  /// \sa
123  /// - AK::MemoryMgr::Init()
124  /// - \ref memorymanager
126 
127  /// Terminate the Memory Manager.
128  /// \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.
129  /// \sa
130  /// - \ref memorymanager
131  AK_EXTERNAPIFUNC( void, Term )();
132 
133  /// Performs whatever steps are required to initialize a thread for use with the memory manager.
134  /// For example initializing thread local storage that the allocator requires to work.
135  /// The default implementation of the memory manager performs thread initialization automatically and therefore this call is optional.
136  /// For implementations where the cost of automatically initializing a thread for use with an allocator would be prohibitively expensive
137  /// this call allows you to perform the initialization once during, for example, thread creation.
138  /// \sa
139  /// - AkMemInitForThread
141 
142  /// Allows you to manually terminate a thread for use with the memory manager.
143  /// The default implementation of the memory manager requires that all threads that interact with the memory manager call this function prior
144  /// to either their termination or the termination of the memory manager. Threads not created by the sound engine itself will not have this
145  /// function called for them automatically.
146  /// 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.
147  /// \sa
148  /// - AkMemTermForThread
150 
151  /// Allows you to "trim" a thread being used with the memory manager.
152  /// This is a function that will be called periodically by some Wwise-owned threads,
153  /// so that any thread-local state can be cleaned up in order to return memory for other systems to use.
154  /// For example, this can be used to return thread-local heaps to global stores or to finalize other deferred operations.
155  /// This function is only required for optimization purposes and does not have to be defined.
156  /// Therefore, unlike TermForThread, this is not expected to be called in all scenarios by Wwise.
157  /// It is also recommended to be called by game engine integrations in any worker threads that run Wwise jobs.
158  /// Refer to \ref eventmgrthread_jobmgr_best_practices for more information.
159  /// \sa
160  /// - AkMemTrimForThread
162 
163  //@}
164 
165  ////////////////////////////////////////////////////////////////////////
166  /// @name Memory Allocation
167  //@{
168 
169 #ifdef AK_MEMDEBUG
170  /// Allocate memory: debug version.
171  /// \return A pointer to the start of the allocated memory (NULL if the allocation could not be completed)
172  /// \sa
173  /// - \ref memorymanager
175  AkMemPoolId in_poolId, ///< ID of the memory category (AkMemID)
176  size_t in_uSize, ///< Number of bytes to allocate
177  const char *in_pszFile, ///< Debug file name
178  AkUInt32 in_uLine ///< Debug line number
179  );
180 #endif // AK_MEMDEBUG
181 
182  /// Allocate memory.
183  /// \return A pointer to the start of the allocated memory (NULL if the allocation could not be completed)
184  /// \sa
185  /// - \ref memorymanager
187  AkMemPoolId in_poolId, ///< ID of the memory category (AkMemID)
188  size_t in_uSize ///< Number of bytes to allocate
189  );
190 
191 #ifdef AK_MEMDEBUG
192  /// Reallocate memory: debug version.
193  /// \return A pointer to the start of the reallocated memory (NULL if the allocation could not be completed)
194  /// \sa
195  /// - \ref memorymanager
197  AkMemPoolId in_poolId,
198  void *in_pAlloc,
199  size_t in_uSize,
200  const char *in_pszFile,
201  AkUInt32 in_uLine
202  );
203 #endif // AK_MEMDEBUG
204 
205  /// Reallocate memory.
206  /// \return A pointer to the start of the reallocated memory (NULL if the allocation could not be completed)
207  /// \sa
208  /// - \ref memorymanager
210  AkMemPoolId in_poolId, ///< ID of the memory category (AkMemID)
211  void * in_pAlloc, ///< Pointer to the start of the allocated memory
212  size_t in_uSize ///< Number of bytes to allocate
213  );
214 
215 #ifdef AK_MEMDEBUG
216  /// Reallocate memory: debug version.
217  /// \return A pointer to the start of the reallocated memory (NULL if the allocation could not be completed)
218  /// \sa
219  /// - \ref memorymanager
221  AkMemPoolId in_poolId, ///< ID of the memory category (AkMemID)
222  void *in_pAlloc, ///< Pointer to the start of the allocated memory
223  size_t in_uSize, ///< Number of bytes to allocate
224  AkUInt32 in_uAlignment, ///< Alignment (in bytes)
225  const char *in_pszFile, ///< Debug file name
226  AkUInt32 in_uLine ///< Debug line number
227  );
228 #endif // AK_MEMDEBUG
229 
230  /// Reallocate memory.
231  /// \return A pointer to the start of the reallocated memory (NULL if the allocation could not be completed)
232  /// \sa
233  /// - \ref memorymanager
235  AkMemPoolId in_poolId, ///< ID of the memory category (AkMemID)
236  void * in_pAlloc, ///< Pointer to the start of the allocated memory
237  size_t in_uSize, ///< Number of bytes to allocate
238  AkUInt32 in_uAlignment ///< Alignment (in bytes)
239  );
240 
241  /// Free memory allocated with the memory manager.
242  /// \sa
243  /// - \ref memorymanager
245  AkMemPoolId in_poolId, ///< ID of the memory category (AkMemID)
246  void * in_pMemAddress ///< Pointer to the start of memory
247  );
248 
249 #ifdef AK_MEMDEBUG
250  /// Allocate memory with a specific alignment. debug version.
251  /// \return A pointer to the start of the allocated memory (NULL if the allocation could not be completed)
252  /// \sa
253  /// - \ref memorymanager
255  AkMemPoolId in_poolId, ///< ID of the memory category (AkMemID)
256  size_t in_uSize, ///< Number of bytes to allocate
257  AkUInt32 in_uAlignment, ///< Alignment (in bytes)
258  const char* in_pszFile, ///< Debug file name
259  AkUInt32 in_uLine ///< Debug line number
260  );
261 #endif // AK_MEMDEBUG
262 
263  /// Allocate memory with a specific alignment.
264  /// \return A pointer to the start of the allocated memory (NULL if the allocation could not be completed)
265  /// \sa
266  /// - \ref memorymanager
268  AkMemPoolId in_poolId, ///< ID of the memory category (AkMemID)
269  size_t in_uSize, ///< Number of bytes to allocate
270  AkUInt32 in_uAlignment ///< Alignment (in bytes)
271  );
272 
273  //@}
274 
275  ////////////////////////////////////////////////////////////////////////
276  /// @name Memory Profiling
277  //@{
278 
279  /// Get statistics for a given memory category.
280  /// \note Be aware of the potentially incoherent nature of reporting such information during concurrent modification by multiple threads.
282  AkMemPoolId in_poolId, ///< ID of the memory category (AkMemID)
283  CategoryStats& out_poolStats ///< Returned statistics.
284  );
285 
286  /// Get statistics for overall memory manager usage.
287  /// \note Be aware of the potentially incoherent nature of reporting such information during concurrent modification by multiple threads.
289  GlobalStats& out_stats ///< Returned statistics.
290  );
291 
292  /// Called to start profiling memory usage for one thread (the calling thread).
293  /// \note Not implementing this will result in the Soundbank tab of the Wwise Profiler to show 0 bytes for memory usage.
295  );
296 
297  /// Called to stop profiling memory usage for the current thread.
298  /// \return The amount of memory allocated by this thread since StartProfileThreadUsage was called.
299  /// \note Not implementing this will result in the Soundbank tab of the Wwise Profiler to show 0 bytes for memory usage.
301  );
302 
303  /// Dumps the currently tracked allocations to a file
304  /// \note AkMemSettings::uMemoryDebugLevel must be enabled and the build must define AK_MEMDEBUG for this to work
306  const AkOSChar* pszFilename ///< Filename.
307  );
308 
309  //@}
310  }
311 
312  /// TempAlloc namespace.
313  /// \remarks The functions in this namespace are thread-safe, unless stated otherwise.
314  namespace TempAlloc
315  {
316  ////////////////////////////////////////////////////////////////////////
317  /// @name TempAlloc systems
318  //@{
319 
320  /// Temp-alloc memory statistics. Whenever these are fetched, they represent the last completed temp-alloc "tick".
321  /// \remarks These statistics are not collected in the Release configuration of the memory mgr.
322  struct Stats
323  {
324  AkUInt32 uMemUsed; ///< Used memory (in bytes).
325  AkUInt32 uMemAllocated; ///< Allocated memory (in bytes).
326  AkUInt32 uBlocksUsed; ///< Number of individual blocks used.
327 
328  AkUInt32 uPeakMemUsed; ///< The peak value for uMemUsed since initialization.
329  AkUInt32 uPeakMemAllocated; ///< The peak value for uMemAllocated since initialization.
330  AkUInt32 uPeakBlocksUsed; ///< The peak value for uBlocksUsed since initialization.
331  AkUInt32 uPeakBlockUsed; ///< The peak amount of used memory in any single block since initialization.
332  };
333 
334  /// IDs of temporary memory pools used by the sound engine.
335  enum Type
336  {
338  Type_NUM, // end of the enum list
339  };
340 
341  /// Initialization settings for temporary-memory pools. Separate settings are specified for each temporary-memory pool.
343  {
344  AkUInt32 uMinimumBlockCount; ///< The number of blocks of memory the system is initialized with and is the minimum kept around forever. Defaults to 1. Higher values increase upfront memory use, but can reduce, or eliminate, the creation and destruction of memory blocks over time.
345  AkUInt32 uMinimumBlockSize; ///< The minimum size of each block. If a new allocation requests a new block of memory, then the new block is the size of the requested allocation times four, and then rounded up to the next multiple of this value. Defaults to 2MiB.
346  AkUInt32 uMaximumUnusedBlocks; ///< The maximum number of blocks that the system keeps in an unused state, and avoids freeing. Defaults to 1. Higher values do not increase the peak memory use, but do prevent unused memory from being freed, in order to reduce creation and destruction of memory blocks.
347 
348  // Various debug options for monitoring and analyzing potential issues in usage of the TempAlloc system. All of these are ignored (treated as disabled) in Release configurations.
349  bool bDebugDetailedStats; ///< Enable to track detailed stats and include them in the detailed stat dump. Detailed stats include the size and quantity of each type of allocation from the system. Disabled by default.
350  bool bDebugClearMemory; ///< Enable to clear any allocation to a deterministic garbage value. Useful to make sure memory is initialized properly. Disabled by default.
351  bool bDebugEnableSentinels; ///< Enable to write out sentinels between most allocations to help detect memory overwrites, verified at the end of a tick. Enabled by default. Increases memory usage of blocks slightly.
352  bool bDebugFlushBlocks; ///< Enable to forcefully release all blocks at the end of a tick and recreate them from scratch every tick. Useful to ensure stale memory is not being accessed. Disabled by default. This might interfere with some stats reporting due to blocks being released between ticks.
353  bool bDebugStandaloneAllocs; ///< Enable to force the block size to be as small as possible for each allocation (smaller than can be achieved by just setting uMinimumBlockSize to very low values). Useful to investigate memory overruns in-depth, especially in conjunction with other options like bDebugFlushBlocks and the MemoryMgr's stomp allocator. If enabled, bDebugDetailedStats and bDebugEnableSentinels will be disabled. Greatly increases CPU and memory usage.
354  };
355 
356  /// Get simple statistics for a given temporary-memory pool
358  Type in_eType, ///< Temporary-memory pool type.
359  Stats& out_stats ///< Returned statistics.
360  );
361 
362  /// Get a detailed listing of the allocations into the temp-alloc pool, and output them to a file.
363  /// \note TempAllocInitSettings::bTrackDetailedStats must be enabled for the specified type to get detailed information about the underlying allocs. Otherwise, only the simple stats are listed.
365  Type in_eType, ///< Temporary-memory pool type.
366  const AkOSChar* pszFilename ///< Filename.
367  );
368  }
369 }
370 
371 #endif // _AKMEMORYMGR_H_
@ AkMemID_Processing
Anything tied to instancing and processing of the DSP graph.
Definition: AkMemoryMgr.h:52
AKSOUNDENGINE_API void DumpToFile(const AkOSChar *pszFilename)
@ AkMemID_SpatialAudioPaths
Spatial audio paths data.
Definition: AkMemoryMgr.h:58
@ AkMemID_MonitorQueue
Monitor Queue.
Definition: AkMemoryMgr.h:60
@ AkMemID_TempAudioRender
Temporary allocations for audio render.
Definition: AkMemoryMgr.h:66
@ AkMemID_FilePackage
File packager.
Definition: AkMemoryMgr.h:62
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)
bool bDebugDetailedStats
Enable to track detailed stats and include them in the detailed stat dump. Detailed stats include the...
Definition: AkMemoryMgr.h:349
AkUInt64 uPeakUsed
Peak used memory (in bytes)
Definition: AkMemoryMgr.h:96
AkUInt32 uMinimumBlockCount
The number of blocks of memory the system is initialized with and is the minimum kept around forever....
Definition: AkMemoryMgr.h:344
AkUInt64 uDeviceUsed
Total device memory used including all categories (in bytes)
Definition: AkMemoryMgr.h:110
Audiokinetic namespace.
bool bDebugClearMemory
Enable to clear any allocation to a deterministic garbage value. Useful to make sure memory is initia...
Definition: AkMemoryMgr.h:350
@ AkMemID_StreamingIO
Streaming Manager I/O memory.
Definition: AkMemoryMgr.h:55
AKSOUNDENGINE_API void * dMalloc(AkMemPoolId in_poolId, size_t in_uSize, const char *in_pszFile, AkUInt32 in_uLine)
@ AkMemID_Media
Media from the Wwise project.
Definition: AkMemoryMgr.h:50
@ AkMemID_Integration
Game engine integration allocations.
Definition: AkMemoryMgr.h:64
AkUInt32 uMemAllocated
Allocated memory (in bytes).
Definition: AkMemoryMgr.h:325
@ 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)
AkUInt32 uPeakBlockUsed
The peak amount of used memory in any single block since initialization.
Definition: AkMemoryMgr.h:331
AKSOUNDENGINE_API void Free(AkMemPoolId in_poolId, void *in_pMemAddress)
#define AK_EXTERNAPIFUNC(_type, _name)
AKSOUNDENGINE_API void * Malloc(AkMemPoolId in_poolId, size_t in_uSize)
bool bDebugEnableSentinels
Enable to write out sentinels between most allocations to help detect memory overwrites,...
Definition: AkMemoryMgr.h:351
AKSOUNDENGINE_API void TrimForThread()
AkUInt32 uPeakBlocksUsed
The peak value for uBlocksUsed since initialization.
Definition: AkMemoryMgr.h:330
AkInt32 AkMemPoolId
Memory pool ID.
Definition: AkTypes.h:62
AkUInt32 uMaximumUnusedBlocks
The maximum number of blocks that the system keeps in an unused state, and avoids freeing....
Definition: AkMemoryMgr.h:346
@ AkMemID_Profiler
Profiler.
Definition: AkMemoryMgr.h:61
AkMemID
Memory category IDs.
Definition: AkMemoryMgr.h:46
char AkOSChar
Generic character string.
Definition: AkTypes.h:60
AkUInt32 uAllocs
Number of allocation calls since initialization.
Definition: AkMemoryMgr.h:97
AKSOUNDENGINE_API void Term()
AKSOUNDENGINE_API void GetGlobalStats(GlobalStats &out_stats)
AKSOUNDENGINE_API void InitForThread()
@ AkMemID_SpatialAudioGeometry
Spatial audio geometry data.
Definition: AkMemoryMgr.h:57
AkUInt64 uReserved
Total reserved memory. (Used and unused). Will return 0 if the reserved memory is not traceable.
Definition: AkMemoryMgr.h:111
AkUInt32 uMemUsed
Used memory (in bytes).
Definition: AkMemoryMgr.h:324
AkUInt64 uMax
Maximum total allocation size, specified in the initialization settings through uMemAllocationSizeLim...
Definition: AkMemoryMgr.h:112
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 GetStats(Type in_eType, Stats &out_stats)
Get simple statistics for a given temporary-memory pool.
@ AkMemID_JobMgr
Allocations for Sound Engine jobs and job dependencies.
Definition: AkMemoryMgr.h:65
AKSOUNDENGINE_API void * Malign(AkMemPoolId in_poolId, size_t in_uSize, AkUInt32 in_uAlignment)
@ AkMemID_SoundEngine
Base sound engine allocations (managers, etc).
Definition: AkMemoryMgr.h:63
Type
IDs of temporary memory pools used by the sound engine.
Definition: AkMemoryMgr.h:336
AKSOUNDENGINE_API void StartProfileThreadUsage()
@ AkMemID_GameSim
Game Simulator allocations.
Definition: AkMemoryMgr.h:59
@ AkMemID_GameObject
Game Objects and related.
Definition: AkMemoryMgr.h:51
@ AkMemID_Streaming
Streaming Manager objects.
Definition: AkMemoryMgr.h:54
@ AkMemID_NUM
Category count.
Definition: AkMemoryMgr.h:68
@ AkMemID_MASK
Mask for category IDs.
Definition: AkMemoryMgr.h:69
AKSOUNDENGINE_API void * Realloc(AkMemPoolId in_poolId, void *in_pAlloc, size_t in_uSize)
AkUInt32 uBlocksUsed
Number of individual blocks used.
Definition: AkMemoryMgr.h:326
AkUInt32 uPeakMemAllocated
The peak value for uMemAllocated since initialization.
Definition: AkMemoryMgr.h:329
@ AkMemID_Structure
Structures from the Wwise project.
Definition: AkMemoryMgr.h:49
bool bDebugStandaloneAllocs
Enable to force the block size to be as small as possible for each allocation (smaller than can be ac...
Definition: AkMemoryMgr.h:353
@ AkMemID_Event
Events from the Wwise project.
Definition: AkMemoryMgr.h:48
AKSOUNDENGINE_API AkUInt64 StopProfileThreadUsage()
Initialization settings for temporary-memory pools. Separate settings are specified for each temporar...
Definition: AkMemoryMgr.h:343
AKSOUNDENGINE_API void DumpTempAllocsToFile(Type in_eType, const AkOSChar *pszFilename)
bool bDebugFlushBlocks
Enable to forcefully release all blocks at the end of a tick and recreate them from scratch every tic...
Definition: AkMemoryMgr.h:352
uint64_t AkUInt64
Unsigned 64-bit integer.
AkUInt64 uUsed
Total memory used including all categories (in bytes)
Definition: AkMemoryMgr.h:109
AkUInt64 uUsed
Used memory (in bytes)
Definition: AkMemoryMgr.h:93
@ AkMemID_ProcessingPlugin
Plug-in allocations related to the DSP graph.
Definition: AkMemoryMgr.h:53
AKSOUNDENGINE_API void GetCategoryStats(AkMemPoolId in_poolId, CategoryStats &out_poolStats)
AkUInt32 uMinimumBlockSize
The minimum size of each block. If a new allocation requests a new block of memory,...
Definition: AkMemoryMgr.h:345
uint32_t AkUInt32
Unsigned 32-bit integer.
@ AkMemType_NoTrack
Do not track this allocation.
Definition: AkMemoryMgr.h:73
AKSOUNDENGINE_API bool IsInitialized()
@ AkMemID_SpatialAudio
Spatial audio.
Definition: AkMemoryMgr.h:56
AKSOUNDENGINE_API void * ReallocAligned(AkMemPoolId in_poolId, void *in_pAlloc, size_t in_uSize, AkUInt32 in_uAlignment)
@ AkMemType_Device
Device memory type bit.
Definition: AkMemoryMgr.h:72
@ AkMemType_Media
Media memory type bit.
Definition: AkMemoryMgr.h:71
AkUInt32 uPeakMemUsed
The peak value for uMemUsed since initialization.
Definition: AkMemoryMgr.h:328
AkUInt32 uFrees
Number of free calls since initialization.
Definition: AkMemoryMgr.h:98

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise