---
name: "mempool_resize"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/mempool_resize"
---

# mempool\_resize(9)

resize an existing memory pool

## NAME

mempool\_resize - resize an existing memory pool

## SYNOPSIS

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

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

## COPYRIGHT
