GNU g++  v5.2.1
GNU Standard C++
Allocators

Functions

namespace __gnu_cxx _GLIBCXX_VISIBILITY (default)
 

Detailed Description

Classes encapsulating memory operations.

Function Documentation

namespace __gnu_cxx _GLIBCXX_VISIBILITY ( default  )

Uniform interface to C++98 and C++0x allocators.

Base class.

An allocator that uses previously allocated memory. This memory can be externally, globally, or otherwise allocated.

A meta-allocator with debugging bits.

This is precisely the allocator defined in the C++03 Standard.

An example allocator which uses a non-standard pointer type.

This allocator specifies that containers use a 'relative pointer' as it's pointer type. (See ext/pointer.h) Memory allocation in this example is still performed using std::allocator.

An allocator that uses malloc.

This is precisely the allocator defined in the C++ Standard.

  • all allocation calls malloc
  • all deallocation calls free

Base class for pool object.

Data describing the underlying memory pool, parameterized on threading support.

Specialization for single thread.

Policy for shared __pool objects.

Policy for individual __pool objects.

Base class for _Tp dependent member functions.

This is a fixed size (power of 2) allocator which - when compiled with thread support - will maintain one freelist per size per thread plus a global one. Steps are taken to limit the per thread freelist sizes (by returning excess back to the global list).

Further details: https://gcc.gnu.org/onlinedocs/libstdc++/manual/mt_allocator.html

An allocator that uses global new, as per [20.4].

This is precisely the allocator defined in the C++ Standard.

  • all allocation calls operator new
  • all deallocation calls operator delete
Template Parameters
_TpType of allocated object.

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.

Allocator using a memory pool with a single lock.

References std::__exception_ptr::swap().

Here is the call graph for this function: