![]() |
ezEngine Release 26.3
|

Public Member Functions | |
| ezAllocatorImpl (ezStringView sName, ezAllocator *pParent) | |
| virtual void * | Allocate (size_t uiSize, size_t uiAlign, ezMemoryUtils::DestructorFunction destructorFunc=nullptr) override |
| Interface, do not use this directly, always use the new/delete macros below. | |
| virtual void | Deallocate (void *pPtr) override |
| Deallocates memory previously allocated by this allocator. | |
| virtual size_t | AllocatedSize (const void *pPtr) override |
| Returns the number of bytes allocated at this address. | |
| virtual ezAllocatorId | GetId () const override |
| virtual Stats | GetStats () const override |
| ezAllocator * | GetParent () const |
Public Member Functions inherited from ezAllocator | |
| virtual void * | Reallocate (void *pPtr, size_t uiCurrentSize, size_t uiNewSize, size_t uiAlign) |
| Reallocates memory, potentially moving the data to a new location. | |
Protected Attributes | |
| AllocationPolicy | m_allocator |
| ezAllocatorId | m_Id |
| ezThreadID | 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 ezAllocator.
Reimplemented in ezLinearAllocator< TrackingMode, OverwriteMemoryOnReset >, ezLinearAllocator< ezAllocatorTrackingMode::Basics >, and ezLinearAllocator< ezAllocatorTrackingMode::Nothing >.
|
overridevirtual |
Returns the number of bytes allocated at this address.
This information is only available if allocation tracking is enabled (see ezAllocatorTrackingMode and EZ_ALLOC_TRACKING_DEFAULT). Returns 0 when tracking is disabled or for invalid pointers. Primarily used for debugging and memory analysis.
Implements ezAllocator.
|
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 ezAllocator.
Reimplemented in ezLinearAllocator< TrackingMode, OverwriteMemoryOnReset >, ezLinearAllocator< ezAllocatorTrackingMode::Basics >, and ezLinearAllocator< ezAllocatorTrackingMode::Nothing >.
|
overridevirtual |
Implements ezAllocator.
|
overridevirtual |
Implements ezAllocator.