Pothos
0.4.0-gd11861cd
The Pothos dataflow programming software suite
|
#include <BufferPool.hpp>
Public Member Functions | |
BufferPool (void) | |
Construct an empty buffer pool. More... | |
void | clear (void) |
const Pothos::BufferChunk & | get (const size_t numBytes) |
The simple buffer pool holds a collection of re-usable buffers. When the client requests a particular buffer size from the pool, the pool first looks for an existing and unused buffer that matches the requested size, or allocates a new buffer.
Pothos::BufferPool::BufferPool | ( | void | ) |
Construct an empty buffer pool.
void Pothos::BufferPool::clear | ( | void | ) |
Clear all existing entries in the pool.
const Pothos::BufferChunk& Pothos::BufferPool::get | ( | const size_t | numBytes | ) |
Get a buffer from the pool or make one if none available.
numBytes | the size of the requested buffer in bytes |