libsc
2.8.7
The SC library provides support for parallel scientific applications.
|
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 | |
int | zero_and_persist |
Boolean; is set in constructor. | |
sc_mstamp_t | mstamp |
fixed-size chunk allocator | |
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. If the zero_and_persist option is selected, new elements are initialized to all zeros on creation, and the contents of an element are not touched between freeing and re-returning it.