3#include <Foundation/Basics.h>
16 PL_ASSERT_ALWAYS(m_pParent !=
nullptr,
"Parent allocator must not be nullptr");
19 PL_FORCE_INLINE
void* Allocate(
size_t uiSize,
size_t uiAlign) {
return m_pParent->
Allocate(uiSize, uiAlign); }
21 PL_FORCE_INLINE
void* Reallocate(
void* pPtr,
size_t uiCurrentSize,
size_t uiNewSize,
size_t uiAlign)
23 return m_pParent->Reallocate(pPtr, uiCurrentSize, uiNewSize, uiAlign);
26 PL_FORCE_INLINE
void Deallocate(
void* pPtr) { m_pParent->Deallocate(pPtr); }
28 PL_FORCE_INLINE
size_t AllocatedSize(
const void* pPtr) {
return m_pParent->
AllocatedSize(pPtr); }
30 PL_ALWAYS_INLINE
plAllocator* GetParent()
const {
return m_pParent; }
This Allocation policy redirects all operations to its parent.
Definition AllocPolicyProxy.h:11
Base class for all memory allocators.
Definition Allocator.h:23
virtual void * Allocate(size_t uiSize, size_t uiAlign, plMemoryUtils::DestructorFunction destructorFunc=nullptr)=0
Interface, do not use this directly, always use the new/delete macros below.
virtual size_t AllocatedSize(const void *pPtr)=0
Returns the number of bytes allocated at this address.