---
name: "std::__default_alloc_template"
section: "3"
platform: "linux"
package: "libstdc++5-3.3-doc"
version: "1:3.3.6-15"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/std::__default_alloc_template"
---

# std::\_\_default\_alloc\_template(3)

## NAME

std::\_\_default\_alloc\_template -

## SYNOPSIS

`#include <memory>`

### Static Public Member Functions

static void \* **allocate** (size\_t n)\
 static void **deallocate** (void \*\_\_p, size\_t n)\
 static void \* **reallocate** (void \*\_\_p, size\_t \_\_old\_sz, size\_t new\_sz)\

### Private Types

enum \
 enum \
 enum \

### Static Private Member Functions

static size\_t **S\_round\_up** (size\_t \_\_bytes)\
 static size\_t **S\_freelist\_index** (size\_t \_\_bytes)\
 static void \* **S\_refill** (size\_t n)\
 static char \* **S\_chunk\_alloc** (size\_t size, int &nobjs)\

### Static Private Attributes

static **Obj** \*volatile **S\_free\_list** \[NFREELISTS\]\
 static char \* **S\_start\_free**\
 static char \* **S\_end\_free**\
 static size\_t **S\_heap\_size**\
 static **STL\_mutex\_lock** **S\_node\_allocator\_lock**\
 static Atomic\_word **S\_force\_new**\

### Friends

struct **Lock**\

### Classes

struct **Lock**\
 union **Obj**\

## Detailed Description

### template\<bool \_\_threads, int inst\> class std::\_\_default\_alloc\_template\< \_\_threads, inst \>

(See **allocators info**  for more.)

Definition at line 333 of file memory.

## Author

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