8#ifndef MIDDLEBOX_BUFFERPOOL_HH
9#define MIDDLEBOX_BUFFERPOOL_HH
11#include "bufferpoolnode.hh"
31 BufferPool(uint32_t initialNumber, uint32_t initialSize);
55 void allocateMoreBuffers(uint32_t n);
Class used to provide a pool of buffers that can have a dynamic size and be resized at any moment.
Definition bufferpool.hh:25
~BufferPool()
Destruct a BufferPool and free the memory.
Definition bufferpool.cc:21
BufferPoolNode * getBuffer()
Return a buffer from the pool. Note that the size of the buffer is random, so be sure to resize it to...
Definition bufferpool.cc:54
void releaseBuffer(BufferPoolNode *buffer)
Put back a buffer into the pool.
Definition bufferpool.cc:48
Class used to manage a buffer obtained via a BufferPool.
Definition bufferpoolnode.hh:21