Struct mpool
Defined in File mpool.h
Struct Documentation
-
struct mpool
Memory pool: a threadsafe malloc()/free() over a set of memory chunks.
Memory chunks must be fixed size.
Public Members
-
struct llist_node *nodes
Space for the llist nodes for both the free and allocated lists.
-
int *refs
Reference counting. Same length as max # elements.
-
size_t elt_size
Size of elements in the pool in bytes.
-
size_t max_elts
Max # of elements in the pool. Must be > 0.
-
uint32_t flags
Run time configuration flags. Valid flags are:
All other flags are ignored.
-
struct llist_node *nodes