dune-common
2.4.1-rc2
|
Allocators implementation which simply calls malloc/free. More...
#include <dune/common/mallocallocator.hh>
Classes | |
struct | rebind |
Public Types | |
typedef std::size_t | size_type |
typedef std::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 | |
MallocAllocator () throw () | |
create a new MallocAllocator More... | |
template<class U > | |
MallocAllocator (const MallocAllocator< U > &) throw () | |
copy construct from an other MallocAllocator, possibly for a different result type More... | |
~MallocAllocator () throw () | |
cleanup this allocator More... | |
pointer | address (reference x) const |
const_pointer | address (const_reference x) const |
pointer | allocate (size_type n, const void *hint=0) |
allocate n objects of type T More... | |
void | deallocate (pointer p, size_type n) |
deallocate n objects of type T at address p More... | |
size_type | max_size () const throw () |
max size for allocate More... | |
void | construct (pointer p, const T &val) |
copy-construct an object of type T (i.e. make a placement new on p) More... | |
template<typename... _Args> | |
void | construct (pointer p, _Args &&...__args) |
construct an object of type T from variadic parameters More... | |
void | destroy (pointer p) |
destroy an object of type T (i.e. call the destructor) More... | |
Allocators implementation which simply calls malloc/free.
typedef const T* Dune::MallocAllocator< T >::const_pointer |
typedef const T& Dune::MallocAllocator< T >::const_reference |
typedef std::ptrdiff_t Dune::MallocAllocator< T >::difference_type |
typedef T* Dune::MallocAllocator< T >::pointer |
typedef T& Dune::MallocAllocator< T >::reference |
typedef std::size_t Dune::MallocAllocator< T >::size_type |
typedef T Dune::MallocAllocator< T >::value_type |
|
inline |
create a new MallocAllocator
|
inline |
copy construct from an other MallocAllocator, possibly for a different result type
|
inline |
cleanup this allocator
|
inline |
|
inline |
|
inline |
allocate n objects of type T
References DUNE_UNUSED_PARAMETER, and Dune::MallocAllocator< T >::max_size().
|
inline |
copy-construct an object of type T (i.e. make a placement new on p)
|
inline |
construct an object of type T from variadic parameters
|
inline |
deallocate n objects of type T at address p
References DUNE_UNUSED_PARAMETER.
|
inline |
destroy an object of type T (i.e. call the destructor)
|
inline |
max size for allocate
Referenced by Dune::MallocAllocator< T >::allocate().