# Spec MultiPoolAllocator
Allocator that pools memory blocks.

Extends | Allocator
All Extended | Allocator
Defined in | <seqan/basic.h>
Signature | `template <typename TParentAllocator[, unsigned BLOCKING_LIMIT]> class Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> >;`

## Template Parameters

`TParentAllocator` | The parent allocator.
`BLOCKING_LIMIT` | The maximum size for memory blocks to be pooled (default is 256).

## Interface Function Overview

### Interface Functions Inherited From Allocator

- `allocate`
- `clear`
- `deallocate`

## Detailed Description

Freed blocks are not immediately deallocated but recycled in subsequential allocations. This way, the number of calls to the heap manager is reduced and that might speed up memory management.

Note that memory block larger than `BLOCKING_LIMIT` are not pooled but immediately allocated and deallocated using `ParentAllocator`.

#### Dox Sources

    /*!
     * @class MultiPoolAllocator
     *
     * @extends Allocator
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Allocator that pools memory blocks.
     *
     * @signature template <typename TParentAllocator[, unsigned BLOCKING_LIMIT]>
     *            class Allocator<MultiPool<TParentAllocator, BLOCKING_LIMIT> >;
     *
     * @tparam TParentAllocator The parent allocator.
     * @tparam BLOCKING_LIMIT The maximum size for memory blocks to be pooled
     *                        (default is 256).
     *
     * Freed blocks are not immediately deallocated but recycled in subsequential
     * allocations. This way, the number of calls to the heap manager is reduced and
     * that might speed up memory management.
     *
     * Note that memory block larger than <tt>BLOCKING_LIMIT</tt> are not pooled but
     * immediately allocated and deallocated using <tt>ParentAllocator</tt>.
     */