![]() |
Home | Libraries | People | FAQ | More |
boost::fast_pool_allocator<void, UserAllocator, Mutex, NextSize, MaxSize> — Specialization of fast_pool_allocator<void>.
// In header: <boost/pool/pool_alloc.hpp> template<typename UserAllocator, typename Mutex, unsigned NextSize, unsigned MaxSize> class fast_pool_allocator<void, UserAllocator, Mutex, NextSize, MaxSize> { public: // types typedef void * pointer; typedef const void * const_pointer; typedef void value_type; typedef UserAllocator user_allocator; typedef Mutex mutex; typedef value_type & reference; typedef const value_type & const_reference; typedef pool< UserAllocator >::size_type size_type; typedef pool< UserAllocator >::difference_type difference_type; // member classes/structs/unions // Nested class rebind allows for transformation from fast_pool_allocator<T> to fast_pool_allocator<underline>. </underline> template<typename U> struct rebind { // types typedef fast_pool_allocator< U, UserAllocator, Mutex, NextSize, MaxSize > other; }; // public member functions fast_pool_allocator(); void construct(const pointer, const value_type &); void destroy(const pointer); bool operator==(const fast_pool_allocator &) const; bool operator!=(const fast_pool_allocator &) const; // public static functions static pointer address(reference); static size_type max_size(); static pointer allocate(const size_type); static void deallocate(const pointer, const size_type); // public data members static const unsigned next_size; };
Specialization of fast_pool_allocator<void> required to make the allocator standard-conforming.
fast_pool_allocator public member functionsfast_pool_allocator();
Ensures construction of the underlying singleton_pool IFF an instance of this allocator is constructed during global initialization. See ticket #2359 for a complete explanation at http://svn.boost.org/trac/boost/ticket/2359 .
void construct(const pointer ptr, const value_type & t);
void destroy(const pointer ptr);
Destroy ptr using destructor.
bool operator==(const fast_pool_allocator &) const;
bool operator!=(const fast_pool_allocator &) const;