![]() |
XII Release 0.1.0
|
Public Member Functions | |
| xiiAllocatorImpl (xiiStringView sName, xiiAllocator *pParent) | |
| virtual void * | Allocate (size_t uiSize, size_t uiAlign, xiiMemoryUtils::DestructorFunction destructorFunc=nullptr) override |
| virtual void | Deallocate (void *pPtr) override |
| virtual size_t | AllocatedSize (const void *pPtr) override |
| virtual xiiAllocatorId | GetId () const override |
| virtual Stats | GetStats () const override |
| xiiAllocator * | GetParent () const |
| Public Member Functions inherited from xiiAllocator | |
| xiiAllocator () | |
| Copyright (c) Theophilus Eriata. All Rights Reserved. | |
| virtual void * | Reallocate (void *pPtr, size_t uiCurrentSize, size_t uiNewSize, size_t uiAlign) |
| Copyright (c) Theophilus Eriata. All Rights Reserved. | |
Protected Attributes | |
| AllocationPolicy | m_Allocator |
| xiiAllocatorId | m_Id |
| xiiThreadID | m_ThreadID |
|
overridevirtual |
Interface, do not use this directly, always use the new/delete macros below
Allocates aligned memory of the specified size. The destructorFunc parameter is used for automatic cleanup when the allocator is reset or destroyed (mainly used by linear allocators).
Implements xiiAllocator.
Reimplemented in xiiLinearAllocator< TrackingMode, OverwriteMemoryOnReset >, xiiLinearAllocator< xiiAllocatorTrackingMode::Basics, OverwriteMemoryOnReset >, and xiiLinearAllocator< xiiAllocatorTrackingMode::DoNotTrack >.
|
overridevirtual |
Returns the number of bytes allocated at this address.
This information is only available if allocation tracking is enabled (see xiiAllocatorTrackingMode and XII_ALLOC_TRACKING_DEFAULT). Returns 0 when tracking is disabled or for invalid pointers. Primarily used for debugging and memory analysis.
Implements xiiAllocator.
|
overridevirtual |
Deallocates memory previously allocated by this allocator.
The pointer must have been returned by a previous call to Allocate() on this allocator instance. Passing nullptr is safe and will be ignored.
Implements xiiAllocator.
Reimplemented in xiiLinearAllocator< TrackingMode, OverwriteMemoryOnReset >, xiiLinearAllocator< xiiAllocatorTrackingMode::Basics, OverwriteMemoryOnReset >, and xiiLinearAllocator< xiiAllocatorTrackingMode::DoNotTrack >.
|
overridevirtual |
Implements xiiAllocator.
|
overridevirtual |
Implements xiiAllocator.