---
name: "__gnu_cxx::__pool_alloc_base"
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_base/3cxx"
---

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

Base class for \_\_pool\_alloc.

## NAME

\_\_gnu\_cxx::\_\_pool\_alloc\_base - Base class for \_\_pool\_alloc.

## SYNOPSIS

`#include <pool_allocator.h>`

Inherited by **\_\_gnu\_cxx::\_\_pool\_alloc\< \_Tp \>**` [private]`.

### Protected Types

enum { **\_S\_align** }\
 enum { **\_S\_max\_bytes** }\
 enum { **\_S\_free\_list\_size** }\

### Protected Member Functions

char \* **\_M\_allocate\_chunk** (size\_t \_\_n, int &\_\_nobjs)\
 \_Obj \*volatile \* **\_M\_get\_free\_list** (size\_t \_\_bytes)  throw ()\
 \_\_mutex & **\_M\_get\_mutex** ()  throw ()\
 void \* **\_M\_refill** (size\_t \_\_n)\
 size\_t **\_M\_round\_up** (size\_t \_\_bytes)\

### Static Protected Attributes

static char \* **\_S\_end\_free**\
 static \_Obj \*volatile **\_S\_free\_list** \[\_S\_free\_list\_size\]\
 static size\_t **\_S\_heap\_size**\
 static char \* **\_S\_start\_free**\

## Detailed Description

Base class for \_\_pool\_alloc.

Uses various allocators to fulfill underlying requests (and makes as few requests as possible when in default high-speed pool mode).

Important implementation properties: 0. If globally mandated, then allocate objects from new

- 1\.

  If the clients request an object of size \> \_S\_max\_bytes, the resulting object will be obtained directly from new

- 2\.

  In all other cases, we allocate an object of size exactly \_S\_round\_up(requested\_size). Thus the client has enough size information that we can return the object to the proper free list without permanently losing part of the object.

## Author

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