Thrill  0.1
AllocatorBase< Type > Class Template Reference

Detailed Description

template<typename Type>
class tlx::AllocatorBase< Type >

Definition at line 21 of file allocator_base.hpp.

+ Inheritance diagram for AllocatorBase< Type >:

#include <allocator_base.hpp>

Public Types

using const_pointer = const Type *
 
using const_reference = const Type &
 
using difference_type = std::ptrdiff_t
 
using is_always_equal = std::true_type
 C++11 type flag. More...
 
using pointer = Type *
 
using propagate_on_container_move_assignment = std::true_type
 C++11 type flag. More...
 
using reference = Type &
 
using size_type = std::size_t
 
using value_type = Type
 

Public Member Functions

pointer address (reference x) const noexcept
 Returns the address of x. More...
 
const_pointer address (const_reference x) const noexcept
 Returns the address of x. More...
 
void construct (pointer p, const_reference value)
 Constructs an element object on the location pointed by p. More...
 
template<typename SubType , typename... Args>
void construct (SubType *p, Args &&... args)
 Constructs an element object on the location pointed by p. More...
 
void destroy (pointer p) const noexcept
 Destroys in-place the object pointed by p. More...
 
template<typename SubType >
void destroy (SubType *p) const noexcept
 Destroys in-place the object pointed by p. More...
 
size_type max_size () const noexcept
 Maximum size possible to allocate. More...
 

Static Private Attributes

static constexpr bool debug = true
 

Member Typedef Documentation

◆ const_pointer

using const_pointer = const Type *

Definition at line 28 of file allocator_base.hpp.

◆ const_reference

using const_reference = const Type&

Definition at line 30 of file allocator_base.hpp.

◆ difference_type

using difference_type = std::ptrdiff_t

Definition at line 32 of file allocator_base.hpp.

◆ is_always_equal

using is_always_equal = std::true_type

C++11 type flag.

Definition at line 35 of file allocator_base.hpp.

◆ pointer

using pointer = Type *

Definition at line 27 of file allocator_base.hpp.

◆ propagate_on_container_move_assignment

C++11 type flag.

Definition at line 37 of file allocator_base.hpp.

◆ reference

using reference = Type&

Definition at line 29 of file allocator_base.hpp.

◆ size_type

using size_type = std::size_t

Definition at line 31 of file allocator_base.hpp.

◆ value_type

using value_type = Type

Definition at line 26 of file allocator_base.hpp.

Member Function Documentation

◆ address() [1/2]

pointer address ( reference  x) const
inlinenoexcept

Returns the address of x.

Definition at line 40 of file allocator_base.hpp.

◆ address() [2/2]

const_pointer address ( const_reference  x) const
inlinenoexcept

Returns the address of x.

Definition at line 45 of file allocator_base.hpp.

◆ construct() [1/2]

void construct ( pointer  p,
const_reference  value 
)
inline

Constructs an element object on the location pointed by p.

Definition at line 55 of file allocator_base.hpp.

Referenced by thrill::mem::by_new(), and thrill::mem::mm_new().

◆ construct() [2/2]

void construct ( SubType *  p,
Args &&...  args 
)
inline

Constructs an element object on the location pointed by p.

Definition at line 74 of file allocator_base.hpp.

◆ destroy() [1/2]

void destroy ( pointer  p) const
inlinenoexcept

Destroys in-place the object pointed by p.

Definition at line 65 of file allocator_base.hpp.

Referenced by thrill::mem::by_delete(), and thrill::mem::mm_delete().

◆ destroy() [2/2]

void destroy ( SubType *  p) const
inlinenoexcept

Destroys in-place the object pointed by p.

Definition at line 80 of file allocator_base.hpp.

◆ max_size()

size_type max_size ( ) const
inlinenoexcept

Maximum size possible to allocate.

Definition at line 50 of file allocator_base.hpp.

Referenced by Allocator< char >::allocate(), and FixedAllocator< Type, manager_ >::allocate().

Member Data Documentation

◆ debug

constexpr bool debug = true
staticprivate

Definition at line 23 of file allocator_base.hpp.


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