Plasma Engine  2.0
Loading...
Searching...
No Matches
plAllocPolicyLinear< 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

PL_FORCE_INLINE plAllocPolicyLinear (plAllocator *pParent)
 
PL_FORCE_INLINE void * Allocate (size_t uiSize, size_t uiAlign)
 
PL_FORCE_INLINE void Deallocate (void *pPtr)
 
PL_FORCE_INLINE void Reset ()
 
PL_FORCE_INLINE void FillStats (plAllocator::Stats &ref_stats)
 
PL_ALWAYS_INLINE plAllocatorGetParent () const
 

Detailed Description

template<bool OverwriteMemoryOnReset = false>
class plAllocPolicyLinear< 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
plAllocatorWithPolicy

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