ezEngine  Release 25.03
ezInternal::ezAllocatorImpl< AllocationPolicy, TrackingMode > Class Template Reference
Inheritance diagram for ezInternal::ezAllocatorImpl< AllocationPolicy, TrackingMode >:

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
 
virtual size_t AllocatedSize (const void *pPtr) override
 Returns the number of bytes allocated at this address. More...
 
virtual ezAllocatorId GetId () const override
 
virtual Stats GetStats () const override
 
ezAllocatorGetParent () const
 
- Public Member Functions inherited from ezAllocator
virtual void * Reallocate (void *pPtr, size_t uiCurrentSize, size_t uiNewSize, size_t uiAlign)
 

Protected Attributes

AllocationPolicy m_allocator
 
ezAllocatorId m_Id
 
ezThreadID m_ThreadID
 

Member Function Documentation

◆ AllocatedSize()

template<typename A , ezAllocatorTrackingMode TrackingMode>
size_t ezInternal::ezAllocatorImpl< A, TrackingMode >::AllocatedSize ( const void *  pPtr)
overridevirtual

Returns the number of bytes allocated at this address.

Note
Careful! This information is only available, if allocation tracking is enabled! Otherwise 0 is returned. See ezAllocatorTrackingMode and EZ_ALLOC_TRACKING_DEFAULT.

Implements ezAllocator.


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