Dali 3D User Interface Engine
List of all members | Classes | Public Member Functions | Public Attributes
Dali::Internal::FixedSizeMemoryPool::Impl Struct Reference

Private implementation class. More...

Collaboration diagram for Dali::Internal::FixedSizeMemoryPool::Impl:
Collaboration graph
[legend]

Classes

struct  Block
 Struct to represent a block of memory from which allocations can be made. More...
 

Public Member Functions

 Impl (SizeType fixedSize, SizeType initialCapacity, SizeType maximumBlockCapacity)
 Constructor. More...
 
 ~Impl ()
 Destructor. More...
 
void AllocateNewBlock ()
 Allocate a new block for allocating memory from. More...
 

Public Attributes

Mutex mMutex
 Mutex for thread-safe allocation and deallocation. More...
 
SizeType mFixedSize
 The size of each allocation in bytes. More...
 
Block mMemoryBlocks
 Linked list of allocated memory blocks. More...
 
SizeType mMaximumBlockCapacity
 The maximum allowed capacity of allocations in a new memory block. More...
 
BlockmCurrentBlock
 Pointer to the active block. More...
 
SizeType mCurrentBlockCapacity
 The maximum number of allocations that can be allocated for the current block. More...
 
SizeType mCurrentBlockSize
 The number of allocations allocated to the current block. More...
 
void * mDeletedObjects
 Pointer to the head of the list of deleted objects. The addresses are stored in the allocated memory blocks. More...
 

Detailed Description

Private implementation class.

Definition at line 34 of file fixed-size-memory-pool.cpp.

Constructor & Destructor Documentation

Dali::Internal::FixedSizeMemoryPool::Impl::Impl ( SizeType  fixedSize,
SizeType  initialCapacity,
SizeType  maximumBlockCapacity 
)
inline

Constructor.

Definition at line 77 of file fixed-size-memory-pool.cpp.

References DALI_ASSERT_DEBUG, and mFixedSize.

Dali::Internal::FixedSizeMemoryPool::Impl::~Impl ( )
inline

Member Function Documentation

void Dali::Internal::FixedSizeMemoryPool::Impl::AllocateNewBlock ( )
inline

Allocate a new block for allocating memory from.

Definition at line 109 of file fixed-size-memory-pool.cpp.

References mCurrentBlock, mCurrentBlockCapacity, mCurrentBlockSize, mFixedSize, mMaximumBlockCapacity, and Dali::Internal::FixedSizeMemoryPool::Impl::Block::nextBlock.

Referenced by Dali::Internal::FixedSizeMemoryPool::Allocate().

Here is the caller graph for this function:

Member Data Documentation

Block* Dali::Internal::FixedSizeMemoryPool::Impl::mCurrentBlock

Pointer to the active block.

Definition at line 135 of file fixed-size-memory-pool.cpp.

Referenced by Dali::Internal::FixedSizeMemoryPool::Allocate(), and AllocateNewBlock().

SizeType Dali::Internal::FixedSizeMemoryPool::Impl::mCurrentBlockCapacity

The maximum number of allocations that can be allocated for the current block.

Definition at line 136 of file fixed-size-memory-pool.cpp.

Referenced by Dali::Internal::FixedSizeMemoryPool::Allocate(), and AllocateNewBlock().

SizeType Dali::Internal::FixedSizeMemoryPool::Impl::mCurrentBlockSize

The number of allocations allocated to the current block.

Definition at line 137 of file fixed-size-memory-pool.cpp.

Referenced by Dali::Internal::FixedSizeMemoryPool::Allocate(), and AllocateNewBlock().

void* Dali::Internal::FixedSizeMemoryPool::Impl::mDeletedObjects

Pointer to the head of the list of deleted objects. The addresses are stored in the allocated memory blocks.

Definition at line 139 of file fixed-size-memory-pool.cpp.

Referenced by Dali::Internal::FixedSizeMemoryPool::Allocate(), and Dali::Internal::FixedSizeMemoryPool::Free().

SizeType Dali::Internal::FixedSizeMemoryPool::Impl::mFixedSize

The size of each allocation in bytes.

Definition at line 130 of file fixed-size-memory-pool.cpp.

Referenced by Dali::Internal::FixedSizeMemoryPool::Allocate(), AllocateNewBlock(), and Impl().

SizeType Dali::Internal::FixedSizeMemoryPool::Impl::mMaximumBlockCapacity

The maximum allowed capacity of allocations in a new memory block.

Definition at line 133 of file fixed-size-memory-pool.cpp.

Referenced by AllocateNewBlock().

Block Dali::Internal::FixedSizeMemoryPool::Impl::mMemoryBlocks

Linked list of allocated memory blocks.

Definition at line 132 of file fixed-size-memory-pool.cpp.

Referenced by ~Impl().

Mutex Dali::Internal::FixedSizeMemoryPool::Impl::mMutex

Mutex for thread-safe allocation and deallocation.

Definition at line 128 of file fixed-size-memory-pool.cpp.

Referenced by Dali::Internal::FixedSizeMemoryPool::AllocateThreadSafe(), and Dali::Internal::FixedSizeMemoryPool::FreeThreadSafe().


The documentation for this struct was generated from the following file:
Dali Docs Home
Read more about Dali