mempool_alloc(9)

mempool_alloc9

Allocate an element from a specific memory pool

Usage

void * mempool_alloc(mempool_t * pool, gfp_t gfp_mask);

Arguments

pool

pointer to the memory pool which was allocated via mempool_create.

gfp_mask

the usual allocation bitmask.

Overview

this function only sleeps if the alloc_fn 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.)

Note

using __GFP_ZERO is not supported.

Releases

6 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.