libsc  2.8.7
The SC library provides support for parallel scientific applications.
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Fields
sc_mempool Struct Reference

The sc_mempool object provides a large pool of equal-size elements. More...

#include <sc_containers.h>

Collaboration diagram for sc_mempool:
Collaboration graph
[legend]

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
 

Detailed Description

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.


The documentation for this struct was generated from the following file: