Plasma Engine  2.0
Loading...
Searching...
No Matches
plInternal::plAllocatorImpl< AllocationPolicy, TrackingMode > Class Template Reference
Inheritance diagram for plInternal::plAllocatorImpl< AllocationPolicy, TrackingMode >:

Public Member Functions

 plAllocatorImpl (plStringView sName, plAllocator *pParent)
 
virtual void * Allocate (size_t uiSize, size_t uiAlign, plMemoryUtils::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 plAllocatorId GetId () const override
 
virtual Stats GetStats () const override
 
plAllocatorGetParent () const
 
- Public Member Functions inherited from plAllocator
virtual void * Reallocate (void *pPtr, size_t uiCurrentSize, size_t uiNewSize, size_t uiAlign)
 

Protected Attributes

AllocationPolicy m_allocator
 
plAllocatorId m_Id
 
plThreadID m_ThreadID
 

Member Function Documentation

◆ Allocate()

template<typename A , plAllocatorTrackingMode TrackingMode>
void * plInternal::plAllocatorImpl< A, TrackingMode >::Allocate ( size_t uiSize,
size_t uiAlign,
plMemoryUtils::DestructorFunction destructorFunc = nullptr )
overridevirtual

Interface, do not use this directly, always use the new/delete macros below.

Implements plAllocator.

Reimplemented in plLinearAllocator< TrackingMode, OverwriteMemoryOnReset >, and plLinearAllocator< plAllocatorTrackingMode::Nothing >.

◆ AllocatedSize()

template<typename A , plAllocatorTrackingMode TrackingMode>
size_t plInternal::plAllocatorImpl< 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 plAllocatorTrackingMode and PL_ALLOC_TRACKING_DEFAULT.

Implements plAllocator.

◆ Deallocate()

template<typename A , plAllocatorTrackingMode TrackingMode>
void plInternal::plAllocatorImpl< A, TrackingMode >::Deallocate ( void * pPtr)
overridevirtual

Implements plAllocator.

◆ GetId()

template<typename A , plAllocatorTrackingMode TrackingMode>
plAllocatorId plInternal::plAllocatorImpl< A, TrackingMode >::GetId ( ) const
overridevirtual

Implements plAllocator.

◆ GetStats()

template<typename A , plAllocatorTrackingMode TrackingMode>
plAllocator::Stats plInternal::plAllocatorImpl< A, TrackingMode >::GetStats ( ) const
overridevirtual

Implements plAllocator.


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