|
dune-common
2.3.1
|
Implementations of the STL allocator concept. More...
|
Classes | |
| class | Dune::DebugAllocator< T > |
| Allocators implementation which performs different kind of memory checks. More... | |
| class | Dune::MallocAllocator< T > |
| Allocators implementation which simply calls malloc/free. More... | |
| class | Dune::Pool< T, s > |
| A memory pool of objects. More... | |
| class | Dune::PoolAllocator< T, s > |
| An allocator managing a pool of objects for reuse. More... | |
| class | Dune::PoolAllocator< void, s > |
Functions | |
| template<typename T1 , std::size_t t1, typename T2 , std::size_t t2> | |
| bool | Dune::operator== (const PoolAllocator< T1, t1 > &, const PoolAllocator< T2, t2 > &) |
| template<typename T1 , std::size_t t1, typename T2 , std::size_t t2> | |
| bool | Dune::operator!= (const PoolAllocator< T1, t1 > &, const PoolAllocator< T2, t2 > &) |
| template<typename T , std::size_t t1, std::size_t t2> | |
| bool | Dune::operator== (const PoolAllocator< T, t1 > &p1, const PoolAllocator< T, t2 > &p2) |
| template<typename T , std::size_t t1, std::size_t t2> | |
| bool | Dune::operator!= (const PoolAllocator< T, t1 > &p1, const PoolAllocator< T, t2 > &p2) |
| template<typename T , std::size_t t1, std::size_t t2> | |
| bool | Dune::operator== (const PoolAllocator< void, t1 > &, const PoolAllocator< T, t2 > &) |
| template<typename T , std::size_t t1, std::size_t t2> | |
| bool | Dune::operator!= (const PoolAllocator< void, t1 > &, const PoolAllocator< T, t2 > &) |
| template<std::size_t t1, std::size_t t2> | |
| bool | Dune::operator== (const PoolAllocator< void, t1 > &p1, const PoolAllocator< void, t2 > &p2) |
| template<std::size_t t1, std::size_t t2> | |
| bool | Dune::operator!= (const PoolAllocator< void, t1 > &p1, const PoolAllocator< void, t2 > &p2) |
| Dune::Pool< T, s >::Pool () | |
| Constructor. More... | |
| Dune::Pool< T, s >::~Pool () | |
| Destructor. More... | |
| void | Dune::Pool< T, s >::print (std::ostream &os) |
| Print elements in pool for debugging. More... | |
| void | Dune::Pool< T, s >::free (void *o) |
| Free an object. More... | |
| void * | Dune::Pool< T, s >::allocate () |
| Get a new or recycled object. More... | |
| Dune::PoolAllocator< T, s >::PoolAllocator () | |
| Constructor. More... | |
| pointer | Dune::PoolAllocator< T, s >::allocate (std::size_t n, const_pointer hint=0) |
| Allocates objects. More... | |
| void | Dune::PoolAllocator< T, s >::deallocate (pointer p, std::size_t n) |
| Free objects. More... | |
| void | Dune::PoolAllocator< T, s >::construct (pointer p, const_reference value) |
| Construct an object. More... | |
| void | Dune::PoolAllocator< T, s >::destroy (pointer p) |
| Destroy an object without freeing memory. More... | |
Implementations of the STL allocator concept.
|
inline |
Get a new or recycled object.
|
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. |
|
inline |
Free an object.
| o | The pointer to memory block of the object. |
| bool Dune::operator!= | ( | const PoolAllocator< T1, t1 > & | , |
| const PoolAllocator< T2, t2 > & | |||
| ) |
| bool Dune::operator!= | ( | const PoolAllocator< T, t1 > & | p1, |
| const PoolAllocator< T, t2 > & | p2 | ||
| ) |
| bool Dune::operator!= | ( | const PoolAllocator< void, t1 > & | , |
| const PoolAllocator< T, t2 > & | |||
| ) |
| bool Dune::operator!= | ( | const PoolAllocator< void, t1 > & | p1, |
| const PoolAllocator< void, t2 > & | p2 | ||
| ) |
| bool Dune::operator== | ( | const PoolAllocator< T1, t1 > & | , |
| const PoolAllocator< T2, t2 > & | |||
| ) |
| bool Dune::operator== | ( | const PoolAllocator< T, t1 > & | p1, |
| const PoolAllocator< T, t2 > & | p2 | ||
| ) |
| bool Dune::operator== | ( | const PoolAllocator< void, t1 > & | , |
| const PoolAllocator< T, t2 > & | |||
| ) |
| bool Dune::operator== | ( | const PoolAllocator< void, t1 > & | p1, |
| const PoolAllocator< void, t2 > & | p2 | ||
| ) |
|
inline |
Constructor.
References Dune::Pool< T, s >::alignedSize, Dune::Pool< T, s >::alignment, Dune::Pool< T, s >::chunkSize, dune_static_assert, and Dune::Pool< T, s >::elements.
|
inline |
Constructor.
|
inline |
Print elements in pool for debugging.
|
inline |
Destructor.
1.8.7