ezEngine  Release 25.03
ezAllocPolicyLinear< OverwriteMemoryOnReset > Class Template Reference

This policy implements a linear allocator that can only grow and at some point all allocations gets reset at once. More...

#include <AllocPolicyLinear.h>

Public Types

enum  { Alignment = 16 }
 

Public Member Functions

EZ_FORCE_INLINE ezAllocPolicyLinear (ezAllocator *pParent)
 
EZ_FORCE_INLINE void * Allocate (size_t uiSize, size_t uiAlign)
 
EZ_FORCE_INLINE void Deallocate (void *pPtr)
 
EZ_FORCE_INLINE void Reset ()
 
EZ_FORCE_INLINE void FillStats (ezAllocator::Stats &ref_stats)
 
EZ_ALWAYS_INLINE ezAllocatorGetParent () const
 

Detailed Description

template<bool OverwriteMemoryOnReset = false>
class ezAllocPolicyLinear< OverwriteMemoryOnReset >

This policy implements a linear allocator that can only grow and at some point all allocations gets reset at once.

For debugging purposes, the policy can also overwrite all freed memory with 0xCDCDCDCD to make it easier to find use-after-free situations.

See also
ezAllocatorWithPolicy

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