The PageArenaAllocator is a STL allocator based on PageArena. More...
#include <PageArenaAllocator.h>
Classes | |
struct | rebind |
Public Types | |
typedef ArenaAllocatorBase< T, ArenaT > | Base |
typedef Base::pointer | pointer |
typedef Base::size_type | size_type |
Public Types inherited from Hypertable::ArenaAllocatorBase< T, ArenaT > | |
typedef Base::pointer | pointer |
typedef Base::size_type | size_type |
Public Types inherited from Hypertable::AllocatorBase< T > | |
typedef size_t | size_type |
typedef ptrdiff_t | difference_type |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef T & | reference |
typedef const T & | const_reference |
typedef T | value_type |
Public Member Functions | |
PageArenaAllocator () | |
PageArenaAllocator (ArenaT &arena) | |
template<typename U > | |
PageArenaAllocator (const PageArenaAllocator< U, ArenaT > ©) | |
Copy constructor. More... | |
pointer | allocate (size_type sz) |
Public Member Functions inherited from Hypertable::ArenaAllocatorBase< T, ArenaT > | |
ArenaAllocatorBase () | |
Default constructor; creates an empty object. More... | |
ArenaAllocatorBase (ArenaT &arena) | |
Constructor; takes ownership of a pointer to a memory arena. More... | |
template<typename U > | |
ArenaAllocatorBase (const ArenaAllocatorBase< U, ArenaT > ©) | |
Copy Constructor; copies the memory arena. More... | |
void | check_allocate_size (size_type sz) const |
Sanity check the size of the requested buffer; if it's too large then most likely this is a bug in the application. More... | |
pointer | default_allocate (size_type sz) |
Allocate an array of objects using the regular operator new. More... | |
void | deallocate (pointer p, size_type sz) |
Deletes allocated objects unless an Arena Allocator was used (in this case the function is a nop) More... | |
template<typename U > | |
bool | operator== (const ArenaAllocatorBase< U, ArenaT > &x) const |
operator == returns true if the arena pointers are equal More... | |
template<typename U > | |
bool | operator!= (const ArenaAllocatorBase< U, ArenaT > &x) const |
operator != returns true if the arena pointers are not equal More... | |
template<typename U > | |
void | swap (ArenaAllocatorBase< U, ArenaT > &other) |
Swaps the memory arena from another allocator with the arena of 'this' allocator. More... | |
ArenaT * | arena () const |
Returns a pointer to the Arena. More... | |
void | set_arena (ArenaT *arena) |
Sets the Arena pointer. More... | |
Public Member Functions inherited from Hypertable::AllocatorBase< T > | |
pointer | address (reference x) const |
Returns a pointer to an object of type T. More... | |
const_pointer | address (const_reference x) const |
Returns a const pointer to an object of type T. More... | |
size_type | max_size () const throw () |
Returns the maximum number of objects that this Allocator can allocate; used to check for bad allocations. More... | |
template<class U , class... Args> | |
void | construct (U *p, Args &&...args) |
Creates a new object instance using placement new and the copy constructor. More... | |
void | construct (pointer p) |
Creates a new object instance using placement new and the default constructor. More... | |
void | destroy (pointer p) |
Calls the destructor of an object (unless it's a POD) More... | |
The PageArenaAllocator is a STL allocator based on PageArena.
Do not use directly but when instantiating STL containers, i.e.
std::vector<int, PageArenaAllocator<int> > foo;
Definition at line 47 of file PageArenaAllocator.h.
typedef ArenaAllocatorBase<T, ArenaT> Hypertable::PageArenaAllocator< T, ArenaT >::Base |
Definition at line 48 of file PageArenaAllocator.h.
typedef Base::pointer Hypertable::PageArenaAllocator< T, ArenaT >::pointer |
Definition at line 49 of file PageArenaAllocator.h.
typedef Base::size_type Hypertable::PageArenaAllocator< T, ArenaT >::size_type |
Definition at line 50 of file PageArenaAllocator.h.
|
inline |
Definition at line 56 of file PageArenaAllocator.h.
|
inline |
Definition at line 57 of file PageArenaAllocator.h.
|
inline |
Copy constructor.
Definition at line 61 of file PageArenaAllocator.h.
|
inline |
Definition at line 65 of file PageArenaAllocator.h.