# std::allocator< _Tp > Class Template Reference

`#include <stl_alloc.h>`

List of all members.

## Detailed Description

### template<class _Tp>
class std::allocator< _Tp >

This is a "standard" allocator, as per [20.4]. The private _Alloc is "SGI" style. (See comments at the top of stl_alloc.h.)

The underlying allocator behaves as follows.

- if __USE_MALLOC then
  - thread safety depends on malloc and is entirely out of our hands
  - __malloc_alloc_template is used for memory requests
- else (the default)
  - __default_alloc_template is used via two typedefs
  - "__single_client_alloc" typedef does no locking for threads
  - "__alloc" typedef is threadsafe via the locks
  - __new_alloc is used for memory requests

(See allocators info for more.)

Definition at line 614 of file stl_alloc.h.

The documentation for this class was generated from the following file:

- stl_alloc.h