Pothos  0.4.1-gb758ed46
The Pothos dataflow programming software suite
Public Member Functions | List of all members
Pothos::BufferPool Class Reference

#include <BufferPool.hpp>

Public Member Functions

 BufferPool (void)
 Construct an empty buffer pool. More...
 
void clear (void)
 
const Pothos::BufferChunkget (const size_t numBytes)
 

Detailed Description

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.

Constructor & Destructor Documentation

Pothos::BufferPool::BufferPool ( void  )

Construct an empty buffer pool.

Member Function Documentation

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.

Parameters
numBytesthe size of the requested buffer in bytes
Returns
an available buffer chunk of at least numBytes size

The documentation for this class was generated from the following file: