---
name: "__gnu_cxx::__pool_alloc"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_cxx::__pool_alloc/3cxx"
---

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

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.
