17#ifndef __ROGUE_INTERFACES_STREAM_POOL_H__
18#define __ROGUE_INTERFACES_STREAM_POOL_H__
85 std::queue<uint8_t*> dataQ_;
136 virtual std::shared_ptr<rogue::interfaces::stream::Frame>
acceptReq(uint32_t size,
bool zeroCopyEn);
150 virtual void retBuffer(uint8_t* data, uint32_t meta, uint32_t size);
213 std::shared_ptr<rogue::interfaces::stream::Buffer>
allocBuffer(uint32_t size, uint32_t* total);
231 std::shared_ptr<rogue::interfaces::stream::Buffer>
createBuffer(
void* data,
249typedef std::shared_ptr<rogue::interfaces::stream::Pool>
PoolPtr;
Typed shared-from-this helper for Rogue classes.
Frame and buffer allocator for stream endpoints.
void decCounter(uint32_t alloc)
Decrements allocation counter.
virtual ~Pool()
Destroys the pool and releases any cached buffer storage.
void setFixedSize(uint32_t size)
Sets fixed-size mode.
uint32_t getFixedSize()
Returns fixed-size allocation setting.
void setPoolSize(uint32_t size)
Sets buffer pool size.
virtual void retBuffer(uint8_t *data, uint32_t meta, uint32_t size)
Returns buffer data to the allocator.
uint32_t getAllocBytes()
Returns total currently allocated bytes.
uint32_t getPoolSize()
Returns configured maximum number of cached pool entries.
std::shared_ptr< rogue::interfaces::stream::Buffer > allocBuffer(uint32_t size, uint32_t *total)
Allocate a buffer passed size.
uint32_t getAllocCount()
Returns total currently allocated buffer count.
std::shared_ptr< rogue::interfaces::stream::Buffer > createBuffer(void *data, uint32_t meta, uint32_t size, uint32_t alloc)
Creates a Buffer with a pre-allocated data block.
static void setup_python()
Registers this type with Python bindings.
virtual std::shared_ptr< rogue::interfaces::stream::Frame > acceptReq(uint32_t size, bool zeroCopyEn)
Services a frame allocation request from a master.
Pool()
Constructs a pool with default allocation behavior enabled.
std::shared_ptr< rogue::interfaces::stream::Pool > PoolPtr
Shared pointer alias for Pool.