ezEngine  Milestone 7
ezLargeBlockAllocator< BlockSizeInByte > Class Template Reference

A block allocator which can only allocates blocks of memory at once. More...

#include <LargeBlockAllocator.h>

Classes

struct  SuperBlock
 

Public Member Functions

 ezLargeBlockAllocator (const char *szName, ezAllocatorBase *pParent, ezBitflags< ezMemoryTrackingFlags > flags=ezMemoryTrackingFlags::Default)
 
template<typename T >
ezDataBlock< T, BlockSizeInByte > AllocateBlock ()
 
template<typename T >
void DeallocateBlock (ezDataBlock< T, BlockSizeInByte > &block)
 
const char * GetName () const
 
ezAllocatorId GetId () const
 
const ezAllocatorBase::StatsGetStats () const
 
template<typename T >
EZ_FORCE_INLINE ezDataBlock< T,
BlockSize > 
AllocateBlock ()
 
template<typename T >
EZ_FORCE_INLINE void DeallocateBlock (ezDataBlock< T, BlockSize > &block)
 

Private Member Functions

void * Allocate (size_t uiAlign)
 
void Deallocate (void *ptr)
 

Private Attributes

ezAllocatorId m_Id
 
ezMutex m_mutex
 
ezThreadID m_ThreadID
 
ezDynamicArray< SuperBlockm_superBlocks
 
ezDynamicArray< ezUInt32 > m_freeBlocks
 

Detailed Description

template<ezUInt32 BlockSizeInByte>
class ezLargeBlockAllocator< BlockSizeInByte >

A block allocator which can only allocates blocks of memory at once.


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