XII Release 0.1.0
Loading...
Searching...
No Matches
xiiInternal::xiiAllocatorImpl< AllocationPolicy, TrackingMode > Class Template Reference
Inheritance diagram for xiiInternal::xiiAllocatorImpl< AllocationPolicy, TrackingMode >:
[legend]

Public Member Functions

 xiiAllocatorImpl (xiiStringView sName, xiiAllocatorBase *pParent)
 
virtual void * Allocate (size_t uiSize, size_t uiAlign, xiiMemoryUtils::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.
 
virtual xiiAllocatorId GetId () const override
 
virtual Stats GetStats () const override
 
xiiAllocatorBaseGetParent () const
 
- Public Member Functions inherited from xiiAllocatorBase
virtual void * Reallocate (void *pPtr, size_t uiCurrentSize, size_t uiNewSize, size_t uiAlign)
 

Protected Attributes

AllocationPolicy m_Allocator
 
xiiAllocatorId m_Id
 
xiiThreadID m_ThreadID
 

Member Function Documentation

◆ Allocate()

template<typename A, xiiAllocatorTrackingMode TrackingMode>
void * xiiInternal::xiiAllocatorImpl< A, TrackingMode >::Allocate ( size_t uiSize,
size_t uiAlign,
xiiMemoryUtils::DestructorFunction destructorFunc = nullptr )
overridevirtual

◆ AllocatedSize()

template<typename A, xiiAllocatorTrackingMode TrackingMode>
size_t xiiInternal::xiiAllocatorImpl< 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 xiiAllocatorTrackingMode and XII_ALLOC_TRACKING_DEFAULT.

Implements xiiAllocatorBase.

◆ Deallocate()

template<typename A, xiiAllocatorTrackingMode TrackingMode>
void xiiInternal::xiiAllocatorImpl< A, TrackingMode >::Deallocate ( void * pPtr)
overridevirtual

Implements xiiAllocatorBase.

◆ GetId()

template<typename A, xiiAllocatorTrackingMode TrackingMode>
xiiAllocatorId xiiInternal::xiiAllocatorImpl< A, TrackingMode >::GetId ( ) const
overridevirtual

Implements xiiAllocatorBase.

◆ GetStats()

template<typename A, xiiAllocatorTrackingMode TrackingMode>
xiiAllocatorBase::Stats xiiInternal::xiiAllocatorImpl< A, TrackingMode >::GetStats ( ) const
overridevirtual

Implements xiiAllocatorBase.


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