'\" t .\" Title: mempool_alloc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Memory Management in Linux .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "MEMPOOL_ALLOC" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Memory Management in Linux" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" mempool_alloc \- allocate an element from a specific memory pool .SH "SYNOPSIS" .HP \w'void\ *\ mempool_alloc('u .BI "void * mempool_alloc(mempool_t\ *\ " "pool" ", gfp_t\ " "gfp_mask" ");" .SH "ARGUMENTS" .PP \fIpool\fR .RS 4 pointer to the memory pool which was allocated via \fBmempool_create\fR\&. .RE .PP \fIgfp_mask\fR .RS 4 the usual allocation bitmask\&. .RE .SH "DESCRIPTION" .PP this function only sleeps if the \fBalloc_fn\fR function sleeps or returns NULL\&. Note that due to preallocation, this function *never* fails when called from process contexts\&. (it might fail if called from an IRQ context\&.) .SH "NOTE" .PP using __GFP_ZERO is not supported\&. .SH "COPYRIGHT" .br