mempool_resize
Prev | More Memory Management Functions | Next

## Name

mempool_resize — resize an existing memory pool

## Synopsis

`int mempool_resize (` | mempool_t * pool,
| int new_min_nr,
| gfp_t gfp_mask`)`;

## 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.

`gfp_mask`

  the usual allocation bitmask.

## Description

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.

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.

Prev | Up | Next
mempool_create | Home | mempool_alloc