XII Release 0.1.0
Loading...
Searching...
No Matches
xiiDoubleBufferedLinearAllocator Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <FrameAllocator.h>

Public Types

using LinearAllocatorType = xiiLinearAllocator<xiiAllocatorTrackingMode::Basics, OverwriteMemoryOnReset>

Public Member Functions

 xiiDoubleBufferedLinearAllocator (xiiStringView sName, xiiAllocator *pParent)
 Copyright (c) Theophilus Eriata. All Rights Reserved.
XII_ALWAYS_INLINE xiiAllocator * GetCurrentAllocator () const
void Swap ()
void Reset ()

Static Public Attributes

static constexpr bool OverwriteMemoryOnReset = false

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

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:
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Memory/FrameAllocator.h
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Memory/Implementation/FrameAllocator.cpp