|
dune-common
2.3.1
|
Allocators implementation which performs different kind of memory checks. More...
#include <dune/common/debugallocator.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 | |
| DebugAllocator () throw () | |
| create a new DebugAllocator More... | |
| template<class U > | |
| DebugAllocator (const DebugAllocator< U > &) throw () | |
| copy construct from an other DebugAllocator, possibly for a different result type More... | |
| ~DebugAllocator () throw () | |
| cleanup this allocator More... | |
| pointer | address (reference x) const |
| const_pointer | address (const_reference x) const |
| pointer | allocate (size_type n, DebugAllocator< void >::const_pointer 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) |
| void | destroy (pointer p) |
| destroy an object of type T (i.e. call the destructor) More... | |
Allocators implementation which performs different kind of memory checks.
We check:
When defining DEBUG_ALLOCATOR_KEEP to 1, we also check
When defining DEBUG_NEW_DELETE >= 1, we
| typedef const T* Dune::DebugAllocator< T >::const_pointer |
| typedef const T& Dune::DebugAllocator< T >::const_reference |
| typedef std::ptrdiff_t Dune::DebugAllocator< T >::difference_type |
| typedef T* Dune::DebugAllocator< T >::pointer |
| typedef T& Dune::DebugAllocator< T >::reference |
| typedef std::size_t Dune::DebugAllocator< T >::size_type |
| typedef T Dune::DebugAllocator< T >::value_type |
|
inline | |||||||||||||
create a new DebugAllocator
|
inline | ||||||||||||||
copy construct from an other DebugAllocator, possibly for a different result type
|
inline | |||||||||||||
cleanup this allocator
|
inline |
|
inline |
|
inline |
allocate n objects of type T
References DUNE_UNUSED_PARAMETER.
|
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
|
inline |
destroy an object of type T (i.e. call the destructor)
|
inline | |||||||||||||
max size for allocate
1.8.7