---
name: "__gnu_cxx::__pool_alloc"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_cxx::__pool_alloc"
---

# \_\_gnu\_cxx::\_\_pool\_alloc(3)

Allocator using a memory pool with a single lock.

## NAME

\_\_gnu\_cxx::\_\_pool\_alloc\< \_Tp \> - Allocator using a memory pool with a single lock.

## SYNOPSIS

\#include \<pool\_allocator.h\>

Inherits **\_\_gnu\_cxx::\_\_pool\_alloc\_base**.

### Public Types

typedef const \_Tp \* **const\_pointer**\
 typedef const \_Tp & **const\_reference**\
 typedef std::ptrdiff\_t **difference\_type**\
 typedef \_Tp \* **pointer**\
 typedef **std::true\_type** **propagate\_on\_container\_move\_assignment**\
 typedef \_Tp & **reference**\
 typedef std::size\_t **size\_type**\
 typedef \_Tp **value\_type**\

### Public Member Functions

**\_\_pool\_alloc** (const \_\_pool\_alloc &) noexcept\
 template\<typename \_Tp1\> **\_\_pool\_alloc** (const \_\_pool\_alloc\< \_Tp1 \> &) noexcept\
 const\_pointer **address** (const\_reference \_\_x) const noexcept\
 pointer **address** (reference \_\_x) const noexcept\
 pointer **allocate** (size\_type \_\_n, const void \*=0)\
 template\<typename \_Up, typename... \_Args\> void **construct** (\_Up \*\_\_p, \_Args &&... \_\_args)\
 void **deallocate** (pointer \_\_p, size\_type \_\_n)\
 template\<typename \_Up\> void **destroy** (\_Up \*\_\_p)\
 size\_type **max\_size** () const noexcept\

## Detailed Description

### template\<typename \_Tp\>

class \_\_gnu\_cxx::\_\_pool\_alloc\< \_Tp \>"Allocator using a memory pool with a single lock.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
