Thrill
0.1
|
Definition at line 31 of file allocator.hpp.
#include <allocator.hpp>
Classes | |
struct | rebind |
Return allocator for different type. More... | |
Public Types | |
using | const_pointer = const Type * |
using | const_reference = const Type & |
using | difference_type = std::ptrdiff_t |
using | is_always_equal = std::false_type |
C++11 type flag. More... | |
using | pointer = Type * |
using | reference = Type & |
using | size_type = std::size_t |
using | value_type = Type |
Public Types inherited from AllocatorBase< Type > | |
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 | |
Allocator (Manager &manager) noexcept | |
Construct Allocator with Manager object. More... | |
Allocator (const Allocator &) noexcept=default | |
copy-constructor More... | |
template<typename OtherType > | |
Allocator (const Allocator< OtherType > &other) noexcept | |
copy-constructor from a rebound allocator More... | |
pointer | allocate (size_type n, const void *=nullptr) |
void | deallocate (pointer p, size_type n) const noexcept |
template<typename Other > | |
bool | operator!= (const Allocator< Other > &other) const noexcept |
Compare to another allocator of same type. More... | |
Allocator & | operator= (const Allocator &) noexcept=default |
copy-assignment operator More... | |
template<typename Other > | |
bool | operator== (const Allocator< Other > &other) const noexcept |
Compare to another allocator of same type. More... | |
Public Member Functions inherited from AllocatorBase< Type > | |
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... | |
Public Attributes | |
Manager * | manager_ |
Static Private Attributes | |
static constexpr bool | debug = false |
using const_pointer = const Type * |
Definition at line 38 of file allocator.hpp.
using const_reference = const Type& |
Definition at line 40 of file allocator.hpp.
using difference_type = std::ptrdiff_t |
Definition at line 42 of file allocator.hpp.
using is_always_equal = std::false_type |
C++11 type flag.
Definition at line 45 of file allocator.hpp.
using pointer = Type * |
Definition at line 37 of file allocator.hpp.
using reference = Type& |
Definition at line 39 of file allocator.hpp.
using size_type = std::size_t |
Definition at line 41 of file allocator.hpp.
using value_type = Type |
Definition at line 36 of file allocator.hpp.
Construct Allocator with Manager object.
Definition at line 52 of file allocator.hpp.
Referenced by Allocator< char >::Allocator(), and Allocator< void >::Allocator().
copy-constructor from a rebound allocator
Definition at line 60 of file allocator.hpp.
Attempts to allocate a block of storage with a size large enough to contain n elements of member type value_type, and returns a pointer to the first element.
Definition at line 69 of file allocator.hpp.
Referenced by thrill::mem::mm_new().
Releases a block of storage previously allocated with member allocate and not yet released.
Definition at line 97 of file allocator.hpp.
Referenced by thrill::mem::mm_delete().
|
inlinenoexcept |
Compare to another allocator of same type.
Definition at line 121 of file allocator.hpp.
copy-assignment operator
Referenced by Allocator< char >::Allocator().
|
inlinenoexcept |
Compare to another allocator of same type.
Definition at line 115 of file allocator.hpp.
|
staticprivate |
Definition at line 33 of file allocator.hpp.
Manager* manager_ |
pointer to common Manager object. If we use a reference here, then the allocator cannot be default move/assigned anymore.
Definition at line 111 of file allocator.hpp.
Referenced by Allocator< char >::allocate(), and Allocator< char >::deallocate().