|
dune-common 2.10
|
#include <dune/common/poolallocator.hh>

Classes | |
| struct | rebind |
Public Types | |
| typedef void * | pointer |
| typedef const void * | const_pointer |
| typedef void | value_type |
| typedef void & | reference |
| The reference type. | |
| typedef const void & | const_reference |
| The constant reference type. | |
| typedef std::size_t | size_type |
| The size type. | |
| typedef std::ptrdiff_t | difference_type |
| The difference_type. | |
| typedef Pool< void, size > | PoolType |
| The type of the memory pool we use. | |
Public Member Functions | |
| PoolAllocator () | |
| Constructor. | |
| pointer | allocate (std::size_t n, const_pointer hint=0) |
| Allocates objects. | |
| void | deallocate (pointer p, std::size_t n) |
| Free objects. | |
| void | construct (pointer p, const_reference value) |
| Construct an object. | |
| void | destroy (pointer p) |
| Destroy an object without freeing memory. | |
| pointer | address (reference x) const |
| Convert a reference to a pointer. | |
| int | max_size () const noexcept |
| Not correctly implemented, yet! | |
Static Public Attributes | |
| static constexpr int | size |
| The number of objects to fit into one memory chunk allocated. | |
| typedef const void* Dune::PoolAllocator< void, s >::const_pointer |
| typedef const void& Dune::PoolAllocator< void, s >::const_reference |
The constant reference type.
| typedef std::ptrdiff_t Dune::PoolAllocator< void, s >::difference_type |
The difference_type.
| typedef void* Dune::PoolAllocator< void, s >::pointer |
| typedef Pool<void,size> Dune::PoolAllocator< void, s >::PoolType |
The type of the memory pool we use.
| typedef void& Dune::PoolAllocator< void, s >::reference |
The reference type.
| typedef std::size_t Dune::PoolAllocator< void, s >::size_type |
The size type.
| typedef void Dune::PoolAllocator< void, s >::value_type |
|
inline |
Constructor.
|
inline |
Convert a reference to a pointer.
|
inline |
Allocates objects.
| n | The number of objects to allocate. Has to be one! |
| hint | Ignored hint. |
|
inline |
Construct an object.
| p | Pointer to the object. |
| value | The value to initialize it to. |
|
inline |
Free objects.
Does not call the destructor!
| n | The number of objects to free. Has to be one! |
| p | Pointer to the first object. |
|
inline |
Destroy an object without freeing memory.
| p | Pointer to the object. |
|
inlinenoexcept |
Not correctly implemented, yet!
|
staticconstexpr |
The number of objects to fit into one memory chunk allocated.