mempool_create (9) Linux Manual Page
mempool_create – create a memory pool
Synopsis
-
mempool_t * mempool_create(intmin_nr, mempool_alloc_talloc_fn* , mempool_free_tfree_fn* , voidpool_data* );
Arguments
min_nr
-
- the minimum number of elements guaranteed to be allocated for this pool.
alloc_fn
- user-defined element-allocation function.
free_fn
- user-defined element-freeing function.
pool_data
- optional private data available to the user-defined functions.
Description
this function creates and allocates a guaranteed size, preallocated memory pool. The pool can be used from the mempool_alloc and mempool_free functions. This function might sleep. Both the alloc_fn and the free_fn functions might sleep – as long as the mempool_alloc function is not called from IRQ contexts.
