#include "tll_common.h"
#include <stdlib.h>
#include "bufferPool_d.h"
Include dependency graph for bufferPool_d.c:
Functions | |
int | bufferPool_d_init (bufferPool_d_t *pThis, int numChunks, int chunkSize) |
Initialize buffer pool
| |
int | bufferPool_d_acquire (bufferPool_d_t *pThis, chunk_d_t **ppChunk, int chunkSize) |
Get a chunk from the buffer pool. | |
int | bufferPool_d_release (bufferPool_d_t *pThis, chunk_d_t *pChunk) |
Release chunk into the free list
| |
int | bufferPool_is_empty (bufferPool_d_t *pThis) |
Returns true if buffer pool is empty. |
int bufferPool_d_acquire | ( | bufferPool_d_t * | pThis, | |
chunk_d_t ** | ppChunk, | |||
int | chunkSize | |||
) |
Get a chunk from the buffer pool.
Parameters:
pThis | pointer to queue data structure | |
ppChunk | pointer pointer to chunk acquired (null if empty) | |
chunkSize | the size of each chunk |
int bufferPool_d_init | ( | bufferPool_d_t * | pThis, | |
int | numChunks, | |||
int | chunkSize | |||
) |
Initialize buffer pool
Parameters:
pThis | pointer to buffer pool data structure |
int bufferPool_d_release | ( | bufferPool_d_t * | pThis, | |
chunk_d_t * | pChunk | |||
) |
Release chunk into the free list
Parameters:
pThis | pointer to queue data structure | |
pChunk | pointer to chunk to release |
int bufferPool_is_empty | ( | bufferPool_d_t * | pThis | ) |
Returns true if buffer pool is empty.
Parameters:
pThis | pointer to queue data structure |