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
26#define BOOST_THREAD_MUTEX_HPP
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>()
72 boost::pool_allocator<T>(o)
81 return boost::singleton_pool<boost::pool_allocator_tag,
sizeof(T)>
::release_memory();
92 return boost::singleton_pool<boost::pool_allocator_tag,
sizeof(T)>
::purge_memory();
126 boost::fast_pool_allocator<T>()
129 template <
typename U>
131 boost::fast_pool_allocator<T>(o)
141 return boost::singleton_pool<boost::fast_pool_allocator_tag,
sizeof(T)>
::release_memory();
152 return boost::singleton_pool<boost::fast_pool_allocator_tag,
sizeof(T)>
::purge_memory();
168class PoolAllocator :
public std::allocator<T>
184 template <
typename U>
215class FastPoolAllocator :
public std::allocator<T>
231 template <
typename U>
An allocator which can be used in standard containers.
static bool purge_memory()
Frees every memory block.
static bool release_memory()
Frees every memory block that doesn't have any allocated chunks.
FastPoolAllocator(const FastPoolAllocator< U > &o)
An allocator which can be used in standard containers.
PoolAllocator(const PoolAllocator< U > &o)
static bool release_memory()
Frees every memory block that doesn't have any allocated chunks.
static bool purge_memory()
Frees every memory block.
The libMesh namespace provides an interface to certain functionality in the library.
Methods required for copy construction of containers using this allocator.
FastPoolAllocator< U > other
Methods required for copy construction of containers using this allocator.