$extrastylesheet
#include <pool_allocator.h>
Classes | |
| struct | rebind |
Public Member Functions | |
| PoolAllocator () | |
| PoolAllocator (const PoolAllocator &o) | |
| PoolAllocator () | |
| PoolAllocator (const PoolAllocator &o) | |
Static Public Member Functions | |
| static bool | release_memory () |
| static bool | purge_memory () |
| static bool | release_memory () |
| static bool | purge_memory () |
An allocator which can be used in standard containers. Uses pool-based memory allocation to efficiently allocate many small objects. Note that object destruction returns memory to the pool rather than deallocate it. It must be explicitly deallocated prior to program termination.
An allocator which can be used in standard containers. A wrapper for std::allocator<> when Boost is not available.
Definition at line 47 of file pool_allocator.h.
| libMesh::PoolAllocator< T >::PoolAllocator | ( | ) | [inline] |
Definition at line 60 of file pool_allocator.h.
:
boost::pool_allocator<T>()
{}
| libMesh::PoolAllocator< T >::PoolAllocator | ( | const PoolAllocator< T > & | o | ) | [inline, explicit] |
Definition at line 64 of file pool_allocator.h.
:
boost::pool_allocator<T>(o)
{}
| libMesh::PoolAllocator< T >::PoolAllocator | ( | ) | [inline] |
Definition at line 158 of file pool_allocator.h.
:
std::allocator<T>()
{}
| libMesh::PoolAllocator< T >::PoolAllocator | ( | const PoolAllocator< T > & | o | ) | [inline, explicit] |
Definition at line 162 of file pool_allocator.h.
:
std::allocator<T>(o)
{}
| static bool libMesh::PoolAllocator< T >::purge_memory | ( | ) | [inline, static] |
Frees every memory block. This function invalidates any pointers previously returned by allocation functions. Returns true if at least one memory block was freed.
Definition at line 81 of file pool_allocator.h.
{
return boost::singleton_pool<boost::pool_allocator_tag, sizeof(T)>::purge_memory();
}
| static bool libMesh::PoolAllocator< T >::purge_memory | ( | ) | [inline, static] |
Frees every memory block. This function invalidates any pointers previously returned by allocation functions. Returns true if at least one memory block was freed.
Definition at line 176 of file pool_allocator.h.
{ /* no-op for std::allocator<> - already freed. */ return false; }
| static bool libMesh::PoolAllocator< T >::release_memory | ( | ) | [inline, static] |
Frees every memory block that doesn't have any allocated chunks. Returns true if at least one memory block was freed.
Definition at line 72 of file pool_allocator.h.
{
return boost::singleton_pool<boost::pool_allocator_tag, sizeof(T)>::release_memory();
}
| static bool libMesh::PoolAllocator< T >::release_memory | ( | ) | [inline, static] |
Frees every memory block that doesn't have any allocated chunks. Returns true if at least one memory block was freed.
Definition at line 170 of file pool_allocator.h.
{ /* no-op for std::allocator<> - already freed. */ return false; }