table of contents
MEMPOOL_RESIZE(9) | Memory Management in Linux | MEMPOOL_RESIZE(9) |
NAME¶
mempool_resize - resize an existing memory pool
SYNOPSIS¶
int mempool_resize(mempool_t * pool, int new_min_nr);
ARGUMENTS¶
mempool_t * pool
int new_min_nr
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¶
July 2017 | Kernel Hackers Manual 4.11 |