1MEMPOOL_ALLOC(9) Memory Management in Linux MEMPOOL_ALLOC(9)
2
3
4
6 mempool_alloc - allocate an element from a specific memory pool
7
9 void * mempool_alloc(mempool_t * pool, gfp_t gfp_mask);
10
12 pool
13 pointer to the memory pool which was allocated via mempool_create.
14
15 gfp_mask
16 the usual allocation bitmask.
17
19 this function only sleeps if the alloc_fn function sleeps or returns
20 NULL. Note that due to preallocation, this function *never* fails when
21 called from process contexts. (it might fail if called from an IRQ
22 context.)
23
25Kernel Hackers Manual 3.10 June 2019 MEMPOOL_ALLOC(9)