Version

menu_open
Wwise SDK 2024.1.3
AK::IAkPluginServiceTempAlloc Class Referenceabstract

#include <IAkPluginTempAlloc.h>

Inheritance diagram for AK::IAkPluginServiceTempAlloc:
AK::IAkPluginService

Public Member Functions

virtual IAkPluginMemAllocGetTempAllocAudioRenderCurrent ()=0
 
virtual IAkPluginMemAllocGetTempAllocAudioRenderDouble ()=0
 
virtual IAkPluginMemAllocGetBookmarkAlloc ()=0
 

Protected Member Functions

virtual ~IAkPluginServiceTempAlloc ()
 
- Protected Member Functions inherited from AK::IAkPluginService
virtual ~IAkPluginService ()
 

Friends

struct PluginBookmarkAllocRegion
 

Detailed Description

Interface for performing extremely-fast zero-fragmentation temporary allocations, e.g. allocations that exist for one or two ticks, or allocations that exist for a single stack frame. These use the existing TempAlloc infrastructure in the core soundengine, whose behaviour and allocation characteristics are defined in the MemoryMgr initialization settings.

For temporary allocations, types and lifetimes can be specified for mallocations – or reallocs. These allocations will only persist for the given soundengine tick (Lifetime_CurrentTick) and be destroyed at the beginning of the next tick, or will persist for two soundengine ticks.

For bookmark allocations, you need to mark the start of a bookmark-allocation Region and perform allocations that persist until the bookmark-allocation region is closed. A struct, "PluginBookmarkAllocRegion" has been provided to help with that.

Because these allocations are guaranteed to be destroyed collectively and simultaneously as a part of their respective system, there is no fragmentation incurred by this, and no 'free' function is available. Also, these allocations are also extremely fast, with no multi-threading contention in most cases, and the total overhead of each alloc measured on the order of dozens of cycles.

See also

Definition at line 59 of file IAkPluginTempAlloc.h.


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