![]() |
XII Release 0.1.0
|
Copyright (c) Theophilus Eriata. All Rights Reserved. More...
#include <AllocationPolicyLinear.h>
Public Types | |
| enum | { Alignment = 16 } |
Public Member Functions | |
| XII_FORCE_INLINE | xiiAllocationPolicyLinear (xiiAllocator *pParent) |
| XII_FORCE_INLINE void | SetNextBucketSize (xiiUInt32 uiSize) |
| Sets the size of the next bucket to allocate. This can be used to prevent an excessive number of buckets if the required total allocation size is known in advance. | |
| XII_FORCE_INLINE void * | Allocate (size_t uiSize, size_t uiAlign) |
| XII_FORCE_INLINE void | Deallocate (void *pPtr) |
| XII_FORCE_INLINE void | Reset () |
| XII_FORCE_INLINE void | FillStats (xiiAllocator::Stats &ref_stats) |
| XII_ALWAYS_INLINE xiiAllocator * | GetParent () const |
Copyright (c) Theophilus Eriata. All Rights Reserved.
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.