The libshare memory buffer pool allocation utilities.
Memory Buffer Pools
typedef struct shpool_t shpool_t
A memory pool.
Initializes a new memory pool instance.
A memory pool of memory buffers.
Calculates the number of avaiable memory buffer contained in the memory pool.
Increases the size of the memory pool.
smaller incremental reallocs have been known to fail in glibc
(shpool_t *pool, unsigned int *idx_p)
Get's the next available memory buffer from a pool.
A reference that is filled with the retained pool index of the buffer.
(shpool_t *pool, int index)
Get's a specific memory buffer by index number.
The index number of the memory buffer.
The memory buffer associated with the index or NULL if none exist.
(shpool_t *pool, shbuf_t *buff)
Put's a memory buffer into a pool.
Free's the resources associated with a memory pool.
A reference to an allocated pool_t memory pool.