libstdc++: __gnu_cxx::__pool_alloc_base Class Reference

libstdc++

__gnu_cxx::__pool_alloc_base Class Reference

`#include <pool_allocator.h>`

Inheritance diagram for __gnu_cxx::__pool_alloc_base:
[legend]

## Protected Types
enum | { _S_free_list_size }
enum | { _S_max_bytes }
enum | { _S_align }

## 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:

1. If globally mandated, then allocate objects from new
2. If the clients request an object of size > _S_max_bytes, the resulting object will be obtained directly from new
3. 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.

Definition at line 77 of file pool_allocator.h.

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum
| protected

Definition at line 84 of file pool_allocator.h.

## ◆ anonymous enum

anonymous enum
| protected

Definition at line 83 of file pool_allocator.h.

## ◆ anonymous enum

anonymous enum
| protected

Definition at line 82 of file pool_allocator.h.

## Member Function Documentation

## ◆ _M_round_up()

size_t __gnu_cxx::__pool_alloc_base::_M_round_up | ( | size_t | __bytes | ) |
| inlineprotected

Definition at line 100 of file pool_allocator.h.

## Member Data Documentation

## ◆ _S_end_free

char* __gnu_cxx::__pool_alloc_base::_S_end_free
| staticprotected

Definition at line 96 of file pool_allocator.h.

## ◆ _S_free_list

_Obj* volatile __gnu_cxx::__pool_alloc_base::_S_free_list[_S_free_list_size]
| staticprotected

Definition at line 92 of file pool_allocator.h.

## ◆ _S_heap_size

size_t __gnu_cxx::__pool_alloc_base::_S_heap_size
| staticprotected

Definition at line 97 of file pool_allocator.h.

## ◆ _S_start_free

char* __gnu_cxx::__pool_alloc_base::_S_start_free
| staticprotected

Definition at line 95 of file pool_allocator.h.

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

- pool_allocator.h