ezEngine Release 26.3
Loading...
Searching...
No Matches
ezDoubleBufferedLinearAllocator Class Reference

A double buffered linear allocator for temporary per-frame allocations. More...

#include <FrameAllocator.h>

Public Types

using LinearAllocatorType = ezLinearAllocator< ezAllocatorTrackingMode::Basics, OverwriteMemoryOnReset >
 

Public Member Functions

 ezDoubleBufferedLinearAllocator (ezStringView sName, ezAllocator *pParent)
 
EZ_ALWAYS_INLINE ezAllocatorGetCurrentAllocator () const
 
void Swap ()
 
void Reset ()
 

Static Public Attributes

static constexpr bool OverwriteMemoryOnReset = false
 

Detailed Description

A double buffered linear allocator for temporary per-frame allocations.

This allocator maintains two linear allocators and swaps between them each frame. One allocator is used for the current frame while the previous frame's allocator is reset. This pattern ensures that allocations from the previous frame remain valid until the next frame begins, which is useful for data that needs to persist across frame boundaries.


The documentation for this class was generated from the following files: