.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "MEMPOOL_CREATE" "" "06 October 2005" "" "" .SH NAME mempool_create \- create a memory pool .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp mempool_t * mempool_create (int \fImin_nr\fB, mempool_alloc_t * \fIalloc_fn\fB, mempool_free_t * \fIfree_fn\fB, void * \fIpool_data\fB); \fR .SH "ARGUMENTS" .TP \fB\fImin_nr\fB\fR the minimum number of elements guaranteed to be allocated for this pool. .TP \fB\fIalloc_fn\fB\fR user-defined element-allocation function. .TP \fB\fIfree_fn\fB\fR user-defined element-freeing function. .TP \fB\fIpool_data\fB\fR optional private data available to the user-defined functions. .SH "DESCRIPTION" .PP 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 \fBalloc_fn\fR and the \fBfree_fn\fR functions might sleep - as long as the mempool_alloc function is not called from IRQ contexts.