Go to the documentation of this file.
18 #ifndef LIBMESH_POOL_ALLOCATOR_H
19 #define LIBMESH_POOL_ALLOCATOR_H
21 #include "libmesh/libmesh_config.h"
23 #ifdef LIBMESH_HAVE_BOOST
25 #define BOOST_POOL_NO_MT // disable multi-threading
26 #define BOOST_THREAD_MUTEX_HPP // define the #include-guard to disable the header
27 # include <boost/pool/pool.hpp>
28 # include <boost/pool/object_pool.hpp>
29 # include <boost/pool/pool_alloc.hpp>
37 #ifdef LIBMESH_HAVE_BOOST
67 boost::pool_allocator<T>()
71 boost::pool_allocator<T>(o)
80 return boost::singleton_pool<boost::pool_allocator_tag,
sizeof(T)>::
release_memory();
91 return boost::singleton_pool<boost::pool_allocator_tag,
sizeof(T)>::
purge_memory();
110 template <
typename T>
125 boost::fast_pool_allocator<T>()
129 boost::fast_pool_allocator<T>(o)
139 return boost::singleton_pool<boost::fast_pool_allocator_tag,
sizeof(T)>::
release_memory();
150 return boost::singleton_pool<boost::fast_pool_allocator_tag,
sizeof(T)>::
purge_memory();
165 template <
typename T>
166 class PoolAllocator :
public std::allocator<T>
211 template <
typename T>
212 class FastPoolAllocator :
public std::allocator<T>
252 #endif // LIBMESH_POOL_ALLOCATOR_H
static bool purge_memory()
Frees every memory block.
An allocator which can be used in standard containers.
static bool purge_memory()
Frees every memory block.
The libMesh namespace provides an interface to certain functionality in the library.
static bool release_memory()
Frees every memory block that doesn't have any allocated chunks.
An allocator which can be used in standard containers.
FastPoolAllocator< U > other
FastPoolAllocator(const FastPoolAllocator &o)
PoolAllocator(const PoolAllocator &o)
static bool release_memory()
Frees every memory block that doesn't have any allocated chunks.
Methods required for copy construction of containers using this allocator.
Methods required for copy construction of containers using this allocator.