mempool_resize(9)

mempool_resize9

Resize an existing memory pool

Usage

int mempool_resize(mempool_t * pool, int new_min_nr);

Arguments

pool

pointer to the memory pool which was allocated via mempool_create.

new_min_nr

the new minimum number of elements guaranteed to be allocated for this pool.

Overview

This function shrinks/grows the pool. In the case of growing, it cannot be guaranteed that the pool will be grown to the new size immediately, but new mempool_free calls will refill it. This function may sleep.

Note, the caller must guarantee that no mempool_destroy is called while this function is running. mempool_alloc & mempool_free might be called (eg. from IRQ contexts) while this function executes.

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.