libsc
1.6.0
|
The sc_mempool object provides a large pool of equal-size elements. More...
#include <sc_containers.h>
Data Fields | |
size_t | elem_size |
size of a single element | |
size_t | elem_count |
number of valid elements | |
struct obstack | obstack |
holds the allocated elements | |
sc_array_t | freed |
buffers the freed elements |
The sc_mempool object provides a large pool of equal-size elements.
The pool grows dynamically for element allocation. Elements are referenced by their address which never changes. Elements can be freed (that is, returned to the pool) and are transparently reused.