This is the documentation for Enlighten.
class Geo GeoMemoryPool
template<class T>
class Geo::GeoMemoryPool
A memory pool.
Variables
Name | Description |
|---|---|
const u32 MemoryAlignment = GEO_ALIGN_OF(T) > GEO_ALIGN_OF(Geo::u32) ? GEO_ALIGN_OF(T) : GEO_ALIGN_OF(Geo::u32) | The required memory alignment. |
Functions
Name | Description |
|---|---|
Allocate object. | |
Returns the index of a newly allocated object within the pool. | |
Calculate required memory size. | |
Deallocate object. | |
Deallocates the object at the specified index within the pool. | |
Create a memory pool. | |
Returns the index of the specified object within the pool. | |
Returns the object at the specified index within the pool. | |
Returns true if no more blocks can be allocated. |
T* Geo::GeoMemoryPool< T >::Allocate
public: T * Allocate()
Allocate object.
Geo::u32 Geo::GeoMemoryPool< T >::AllocateIndex
public: Geo::u32 AllocateIndex()
Returns the index of a newly allocated object within the pool.
static Geo::u32 Geo::GeoMemoryPool< T >::CalculateSize
public: Geo::u32 CalculateSize
(
Geo::u32 count
)
Calculate required memory size.
Parameters
[in] | count | The maximum number of objects the memory pool can allocate. |