Proxy Pool that can allocate DataBuffer objects of a certain size.
More...
#include <DataBuffer.hxx>
|
| | DataBufferPool (unsigned payload_size) |
| |
| size_t | free_items () override |
| | Number of free items in the pool.
|
| |
| size_t | free_items (size_t size) override |
| | Number of free items in the pool for a given allocation size.
|
| |
| void | alloc (DataBuffer **result) |
| | Get a free item out of the pool with untyped data of the size specified in the constructor.
|
| |
| void | alloc (DataBufferPtr *result) |
| | Get a free item out of the pool with untyped data of the size specified in the constructor.
|
| |
| size_t | total_size () |
| |
| template<class BufferType > |
| void | alloc (Buffer< BufferType > **result, Executable *flow=NULL) |
| | Get a free item out of the pool.
|
| |
| template<class BufferType > |
| void | alloc (BufferPtr< BufferType > *result) |
| | Get a free item out of the pool.
|
| |
| template<class BufferType > |
| void | alloc_async (Executable *flow) |
| | Get a free item out of the pool.
|
| |
|
| uint16_t | payloadSize_ |
| | Number of bytes that need to be stored in each buffer.
|
| |
|
| template<class BufferType > |
| static void | alloc_async_init (BufferBase *base, Buffer< BufferType > **result) |
| | Cast the result of an asynchronous allocation and perform a placement new on it.
|
| |
| | Pool () |
| | Default Constructor.
|
| |
| virtual | ~Pool () |
| | default destructor.
|
| |
| size_t | totalSize |
| | keep track of total allocated size of memory
|
| |
Proxy Pool that can allocate DataBuffer objects of a certain size.
All memory comes from the mainBufferPool.
Definition at line 658 of file DataBuffer.hxx.
◆ DataBufferPool()
| DataBufferPool::DataBufferPool |
( |
unsigned |
payload_size | ) |
|
|
inline |
◆ alloc() [1/2]
| void DataBufferPool::alloc |
( |
DataBuffer ** |
result | ) |
|
|
inline |
Get a free item out of the pool with untyped data of the size specified in the constructor.
- Parameters
-
| result | pointer to a pointer to the result |
Definition at line 694 of file DataBuffer.hxx.
◆ alloc() [2/2]
| void DataBufferPool::alloc |
( |
DataBufferPtr * |
result | ) |
|
|
inline |
Get a free item out of the pool with untyped data of the size specified in the constructor.
- Parameters
-
Definition at line 713 of file DataBuffer.hxx.
◆ alloc_size()
| uint16_t DataBufferPool::alloc_size |
( |
| ) |
|
|
inlineprivate |
- Returns
- size of the buffers to allocate.
Definition at line 746 of file DataBuffer.hxx.
◆ alloc_untyped()
|
|
inlineoverrideprivatevirtual |
Internal helper funciton used by the default Buffer allocimplementation.
Implements Pool.
Definition at line 723 of file DataBuffer.hxx.
◆ base_pool()
| Pool * DataBufferPool::base_pool |
( |
| ) |
|
|
inlineprivate |
- Returns
- the pool from which we should get the actual memory we have.
Definition at line 740 of file DataBuffer.hxx.
◆ free()
|
|
inlineoverrideprivatevirtual |
Function called when a buffer refcount reaches zero.
Implements Pool.
Definition at line 729 of file DataBuffer.hxx.
◆ free_items() [1/2]
| size_t DataBufferPool::free_items |
( |
| ) |
|
|
inlineoverridevirtual |
◆ free_items() [2/2]
| size_t DataBufferPool::free_items |
( |
size_t |
size | ) |
|
|
inlineoverridevirtual |
Number of free items in the pool for a given allocation size.
- Parameters
-
- Returns
- number of free items in the pool for a given allocation size
Implements Pool.
Definition at line 685 of file DataBuffer.hxx.
◆ payload_size()
| uint16_t DataBufferPool::payload_size |
( |
| ) |
|
|
inlineprivate |
- Returns
- maximum number of bytes that can be stored inside an allocated buffer.
Definition at line 753 of file DataBuffer.hxx.
◆ payloadSize_
| uint16_t DataBufferPool::payloadSize_ |
|
private |
Number of bytes that need to be stored in each buffer.
Definition at line 759 of file DataBuffer.hxx.
The documentation for this class was generated from the following file: