1 //////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/libs/container for documentation.
9 //////////////////////////////////////////////////////////////////////////////
11 #ifndef BOOST_CONTAINER_ADAPTIVE_POOL_HPP
12 #define BOOST_CONTAINER_ADAPTIVE_POOL_HPP
14 #ifndef BOOST_CONFIG_HPP
15 # include <boost/config.hpp>
18 #if defined(BOOST_HAS_PRAGMA_ONCE)
22 #include <boost/container/detail/config_begin.hpp>
23 #include <boost/container/detail/workaround.hpp>
24 #include <boost/container/container_fwd.hpp>
25 #include <boost/container/detail/version_type.hpp>
26 #include <boost/container/throw_exception.hpp>
27 #include <boost/container/detail/adaptive_node_pool.hpp>
28 #include <boost/container/detail/multiallocation_chain.hpp>
29 #include <boost/container/detail/mpl.hpp>
30 #include <boost/container/detail/dlmalloc.hpp>
31 #include <boost/container/detail/singleton.hpp>
32 #include <boost/container/detail/placement_new.hpp>
34 #include <boost/assert.hpp>
35 #include <boost/static_assert.hpp>
36 #include <boost/move/utility_core.hpp>
43 //!An STL node allocator that uses a modified DLMalloc as memory
46 //!This node allocator shares a segregated storage between all instances
47 //!of adaptive_pool with equal sizeof(T).
49 //!NodesPerBlock is the number of nodes allocated at once when the allocator
50 //!needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks
51 //!that the adaptive node pool will hold. The rest of the totally free blocks will be
52 //!deallocated to the memory manager.
54 //!OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator:
55 //!(memory usable for nodes / total memory allocated from the memory allocator)
57 , std::size_t NodesPerBlock BOOST_CONTAINER_DOCONLY(= ADP_nodes_per_block)
58 , std::size_t MaxFreeBlocks BOOST_CONTAINER_DOCONLY(= ADP_max_free_blocks)
59 , std::size_t OverheadPercent BOOST_CONTAINER_DOCONLY(= ADP_overhead_percent)
60 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I unsigned Version)
64 //!If Version is 1, the allocator is a STL conforming allocator. If Version is 2,
65 //!the allocator offers advanced expand in place and burst allocation capabilities.
67 typedef unsigned int allocation_type;
69 <T, NodesPerBlock, MaxFreeBlocks, OverheadPercent
70 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)
73 static const std::size_t nodes_per_block = NodesPerBlock;
74 static const std::size_t max_free_blocks = MaxFreeBlocks;
75 static const std::size_t overhead_percent = OverheadPercent;
76 static const std::size_t real_nodes_per_block = NodesPerBlock;
78 BOOST_CONTAINER_DOCIGN(BOOST_STATIC_ASSERT((Version <=2)));
84 typedef const T * const_pointer;
85 typedef typename ::boost::container::
86 dtl::unvoid_ref<T>::type reference;
87 typedef typename ::boost::container::
88 dtl::unvoid_ref<const T>::type const_reference;
89 typedef std::size_t size_type;
90 typedef std::ptrdiff_t difference_type;
92 typedef boost::container::dtl::
93 version_type<self_t, Version> version;
95 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
96 typedef boost::container::dtl::
97 basic_multiallocation_chain<void*> multiallocation_chain_void;
98 typedef boost::container::dtl::
99 transform_multiallocation_chain
100 <multiallocation_chain_void, T> multiallocation_chain;
101 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
103 //!Obtains adaptive_pool from
108 typedef adaptive_pool
113 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)
117 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
119 //!Not assignable from related adaptive_pool
120 template<class T2, std::size_t N2, std::size_t F2, std::size_t O2, unsigned Version2>
121 adaptive_pool& operator=
122 (const adaptive_pool<T2, N2, F2, O2, Version2>&);
124 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
127 //!Default constructor
128 adaptive_pool() BOOST_NOEXCEPT_OR_NOTHROW
131 //!Copy constructor from other adaptive_pool.
132 adaptive_pool(const adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
135 //!Copy assignment from other adaptive_pool.
136 adaptive_pool & operator=(const adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
139 //!Copy constructor from related adaptive_pool.
142 (const adaptive_pool<T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent
143 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)> &) BOOST_NOEXCEPT_OR_NOTHROW
147 ~adaptive_pool() BOOST_NOEXCEPT_OR_NOTHROW
150 //!Returns the number of elements that could be allocated.
152 size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
153 { return size_type(-1)/(2u*sizeof(T)); }
155 //!Allocate memory for an array of count elements.
156 //!Throws std::bad_alloc if there is no enough memory
157 pointer allocate(size_type count, const void * = 0)
159 if(BOOST_UNLIKELY(count > size_type(-1)/(2u*sizeof(T))))
160 boost::container::throw_bad_alloc();
162 if(Version == 1 && count == 1){
163 typedef typename dtl::shared_adaptive_node_pool
164 <sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> shared_pool_t;
165 typedef dtl::singleton_default<shared_pool_t> singleton_t;
166 return pointer(static_cast<T*>(singleton_t::instance().allocate_node()));
169 return static_cast<pointer>(dlmalloc_malloc(count*sizeof(T)));
173 //!Deallocate allocated memory.
175 void deallocate(const pointer &ptr, size_type count) BOOST_NOEXCEPT_OR_NOTHROW
178 if(Version == 1 && count == 1){
179 typedef dtl::shared_adaptive_node_pool
180 <sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> shared_pool_t;
181 typedef dtl::singleton_default<shared_pool_t> singleton_t;
182 singleton_t::instance().deallocate_node(ptr);
189 pointer allocation_command(allocation_type command,
190 size_type limit_size,
191 size_type &prefer_in_recvd_out_size,
194 pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse);
195 if(BOOST_UNLIKELY(!ret && !(command & BOOST_CONTAINER_NOTHROW_ALLOCATION)))
196 boost::container::throw_bad_alloc();
200 //!Returns maximum the number of objects the previously allocated memory
201 //!pointed by p can hold.
202 size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW
203 { return dlmalloc_size(p); }
205 //!Allocates just one object. Memory allocated with this function
206 //!must be deallocated only with deallocate_one().
207 //!Throws bad_alloc if there is no enough memory
208 pointer allocate_one()
210 typedef dtl::shared_adaptive_node_pool
211 <sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> shared_pool_t;
212 typedef dtl::singleton_default<shared_pool_t> singleton_t;
213 return (pointer)singleton_t::instance().allocate_node();
216 //!Allocates many elements of size == 1.
217 //!Elements must be individually deallocated with deallocate_one()
218 void allocate_individual(std::size_t num_elements, multiallocation_chain &chain)
220 typedef dtl::shared_adaptive_node_pool
221 <sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> shared_pool_t;
222 typedef dtl::singleton_default<shared_pool_t> singleton_t;
223 singleton_t::instance().allocate_nodes(num_elements, static_cast<typename shared_pool_t::multiallocation_chain&>(chain));
224 //typename shared_pool_t::multiallocation_chain ch;
225 //singleton_t::instance().allocate_nodes(num_elements, ch);
226 //chain.incorporate_after
227 //(chain.before_begin(), (T*)&*ch.begin(), (T*)&*ch.last(), ch.size());
230 //!Deallocates memory previously allocated with allocate_one().
231 //!You should never use deallocate_one to deallocate memory allocated
232 //!with other functions different from allocate_one(). Never throws
233 void deallocate_one(pointer p) BOOST_NOEXCEPT_OR_NOTHROW
235 typedef dtl::shared_adaptive_node_pool
236 <sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> shared_pool_t;
237 typedef dtl::singleton_default<shared_pool_t> singleton_t;
238 singleton_t::instance().deallocate_node(p);
241 void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
243 typedef dtl::shared_adaptive_node_pool
244 <sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> shared_pool_t;
245 typedef dtl::singleton_default<shared_pool_t> singleton_t;
246 //typename shared_pool_t::multiallocation_chain ch(&*chain.begin(), &*chain.last(), chain.size());
247 //singleton_t::instance().deallocate_nodes(ch);
248 singleton_t::instance().deallocate_nodes(chain);
251 //!Allocates many elements of size elem_size.
252 //!Elements must be individually deallocated with deallocate()
253 void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain)
255 BOOST_STATIC_ASSERT(( Version > 1 ));/*
256 dlmalloc_memchain ch;
257 BOOST_CONTAINER_MEMCHAIN_INIT(&ch);
258 if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){
259 boost::container::throw_bad_alloc();
261 chain.incorporate_after(chain.before_begin()
262 ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch)
263 ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
264 ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );*/
265 if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes
266 (n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast<dlmalloc_memchain *>(&chain)))){
267 boost::container::throw_bad_alloc();
271 //!Allocates n_elements elements, each one of size elem_sizes[i]
272 //!Elements must be individually deallocated with deallocate()
273 void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain)
275 BOOST_STATIC_ASSERT(( Version > 1 ));/*
276 dlmalloc_memchain ch;
277 BOOST_CONTAINER_MEMCHAIN_INIT(&ch);
278 if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){
279 boost::container::throw_bad_alloc();
281 chain.incorporate_after(chain.before_begin()
282 ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch)
283 ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
284 ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );*/
285 if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays
286 (n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast<dlmalloc_memchain *>(&chain)))){
287 boost::container::throw_bad_alloc();
291 void deallocate_many(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
293 dlmalloc_memchain ch;
294 void *beg(&*chain.begin()), *last(&*chain.last());
295 size_t size(chain.size());
296 BOOST_CONTAINER_MEMCHAIN_INIT_FROM(&ch, beg, last, size);
297 dlmalloc_multidealloc(&ch);*/
298 dlmalloc_multidealloc(reinterpret_cast<dlmalloc_memchain *>(&chain));
301 //!Deallocates all free blocks of the pool
302 static void deallocate_free_blocks() BOOST_NOEXCEPT_OR_NOTHROW
304 typedef dtl::shared_adaptive_node_pool
305 <sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> shared_pool_t;
306 typedef dtl::singleton_default<shared_pool_t> singleton_t;
307 singleton_t::instance().deallocate_free_blocks();
310 //!Swaps allocators. Does not throw. If each allocator is placed in a
311 //!different memory segment, the result is undefined.
312 friend void swap(adaptive_pool &, adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
315 //!An allocator always compares to true, as memory allocated with one
316 //!instance can be deallocated by another instance
317 friend bool operator==(const adaptive_pool &, const adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
320 //!An allocator always compares to false, as memory allocated with one
321 //!instance can be deallocated by another instance
322 friend bool operator!=(const adaptive_pool &, const adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
326 pointer priv_allocation_command
327 (allocation_type command, std::size_t limit_size
328 ,size_type &prefer_in_recvd_out_size, pointer &reuse_ptr)
330 std::size_t const preferred_size = prefer_in_recvd_out_size;
331 dlmalloc_command_ret_t ret = {0 , 0};
332 if(BOOST_UNLIKELY(limit_size > this->max_size() || preferred_size > this->max_size())){
335 std::size_t l_size = limit_size*sizeof(T);
336 std::size_t p_size = preferred_size*sizeof(T);
339 void* reuse_ptr_void = reuse_ptr;
340 ret = dlmalloc_allocation_command(command, sizeof(T), l_size, p_size, &r_size, reuse_ptr_void);
341 reuse_ptr = ret.second ? static_cast<T*>(reuse_ptr_void) : 0;
343 prefer_in_recvd_out_size = r_size/sizeof(T);
344 return (pointer)ret.first;
368 , std::size_t NodesPerBlock = ADP_nodes_per_block
369 , std::size_t MaxFreeBlocks = ADP_max_free_blocks
370 , std::size_t OverheadPercent = ADP_overhead_percent
371 , unsigned Version = 2
373 class private_adaptive_pool
375 //!If Version is 1, the allocator is a STL conforming allocator. If Version is 2,
376 //!the allocator offers advanced expand in place and burst allocation capabilities.
378 typedef unsigned int allocation_type;
379 typedef private_adaptive_pool
380 <T, NodesPerBlock, MaxFreeBlocks, OverheadPercent
381 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)
384 static const std::size_t nodes_per_block = NodesPerBlock;
385 static const std::size_t max_free_blocks = MaxFreeBlocks;
386 static const std::size_t overhead_percent = OverheadPercent;
387 static const std::size_t real_nodes_per_block = NodesPerBlock;
389 BOOST_CONTAINER_DOCIGN(BOOST_STATIC_ASSERT((Version <=2)));
391 typedef dtl::private_adaptive_node_pool
392 <sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> pool_t;
397 typedef T value_type;
399 typedef const T * const_pointer;
400 typedef typename ::boost::container::
401 dtl::unvoid_ref<T>::type reference;
402 typedef typename ::boost::container::
403 dtl::unvoid_ref<const T>::type const_reference;
404 typedef std::size_t size_type;
405 typedef std::ptrdiff_t difference_type;
407 typedef boost::container::dtl::
408 version_type<self_t, Version> version;
410 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
411 typedef boost::container::dtl::
412 basic_multiallocation_chain<void*> multiallocation_chain_void;
413 typedef boost::container::dtl::
414 transform_multiallocation_chain
415 <multiallocation_chain_void, T> multiallocation_chain;
416 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
418 //!Obtains private_adaptive_pool from
419 //!private_adaptive_pool
423 typedef private_adaptive_pool
428 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)
432 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
434 //!Not assignable from related private_adaptive_pool
435 template<class T2, std::size_t N2, std::size_t F2, std::size_t O2, unsigned Version2>
436 private_adaptive_pool& operator=
437 (const private_adaptive_pool<T2, N2, F2, O2, Version2>&);
438 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
441 //!Default constructor
442 private_adaptive_pool() BOOST_NOEXCEPT_OR_NOTHROW
445 //!Copy constructor from other private_adaptive_pool.
446 private_adaptive_pool(const private_adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
449 //!Copy assignment from other adaptive_pool.
450 private_adaptive_pool & operator=(const private_adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
453 //!Copy constructor from related private_adaptive_pool.
455 private_adaptive_pool
456 (const private_adaptive_pool<T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent
457 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)> &) BOOST_NOEXCEPT_OR_NOTHROW
461 ~private_adaptive_pool() BOOST_NOEXCEPT_OR_NOTHROW
464 //!Returns the number of elements that could be allocated.
466 size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
467 { return size_type(-1)/(2u*sizeof(T)); }
469 //!Allocate memory for an array of count elements.
470 //!Throws std::bad_alloc if there is no enough memory
471 pointer allocate(size_type count, const void * = 0)
473 if(BOOST_UNLIKELY(count > size_type(-1)/(2u*sizeof(T))))
474 boost::container::throw_bad_alloc();
476 if(Version == 1 && count == 1){
477 return pointer(static_cast<T*>(m_pool.allocate_node()));
480 return static_cast<pointer>(dlmalloc_malloc(count*sizeof(T)));
484 //!Deallocate allocated memory.
486 void deallocate(const pointer &ptr, size_type count) BOOST_NOEXCEPT_OR_NOTHROW
489 if(Version == 1 && count == 1){
490 m_pool.deallocate_node(ptr);
497 pointer allocation_command(allocation_type command,
498 size_type limit_size,
499 size_type &prefer_in_recvd_out_size,
502 pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse);
503 if(BOOST_UNLIKELY(!ret && !(command & BOOST_CONTAINER_NOTHROW_ALLOCATION)))
504 boost::container::throw_bad_alloc();
508 //!Returns maximum the number of objects the previously allocated memory
509 //!pointed by p can hold.
510 size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW
511 { return dlmalloc_size(p); }
513 //!Allocates just one object. Memory allocated with this function
514 //!must be deallocated only with deallocate_one().
515 //!Throws bad_alloc if there is no enough memory
516 pointer allocate_one()
518 return (pointer)m_pool.allocate_node();
521 //!Allocates many elements of size == 1.
522 //!Elements must be individually deallocated with deallocate_one()
523 void allocate_individual(std::size_t num_elements, multiallocation_chain &chain)
525 m_pool.allocate_nodes(num_elements, static_cast<typename pool_t::multiallocation_chain&>(chain));
528 //!Deallocates memory previously allocated with allocate_one().
529 //!You should never use deallocate_one to deallocate memory allocated
530 //!with other functions different from allocate_one(). Never throws
531 void deallocate_one(pointer p) BOOST_NOEXCEPT_OR_NOTHROW
533 m_pool.deallocate_node(p);
536 void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
538 m_pool.deallocate_nodes(chain);
541 //!Allocates many elements of size elem_size.
542 //!Elements must be individually deallocated with deallocate()
543 void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain)
545 BOOST_STATIC_ASSERT(( Version > 1 ));
546 if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes
547 (n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast<dlmalloc_memchain *>(&chain)))){
548 boost::container::throw_bad_alloc();
552 //!Allocates n_elements elements, each one of size elem_sizes[i]
553 //!Elements must be individually deallocated with deallocate()
554 void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain)
556 BOOST_STATIC_ASSERT(( Version > 1 ));
557 if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays
558 (n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast<dlmalloc_memchain *>(&chain)))){
559 boost::container::throw_bad_alloc();
563 void deallocate_many(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
565 dlmalloc_multidealloc(reinterpret_cast<dlmalloc_memchain *>(&chain));
568 //!Deallocates all free blocks of the pool
569 void deallocate_free_blocks() BOOST_NOEXCEPT_OR_NOTHROW
571 m_pool.deallocate_free_blocks();
574 //!Swaps allocators. Does not throw. If each allocator is placed in a
575 //!different memory segment, the result is undefined.
576 friend void swap(private_adaptive_pool &, private_adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
579 //!An allocator always compares to true, as memory allocated with one
580 //!instance can be deallocated by another instance
581 friend bool operator==(const private_adaptive_pool &, const private_adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
584 //!An allocator always compares to false, as memory allocated with one
585 //!instance can be deallocated by another instance
586 friend bool operator!=(const private_adaptive_pool &, const private_adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW
590 pointer priv_allocation_command
591 (allocation_type command, std::size_t limit_size
592 ,size_type &prefer_in_recvd_out_size, pointer &reuse_ptr)
594 std::size_t const preferred_size = prefer_in_recvd_out_size;
595 dlmalloc_command_ret_t ret = {0 , 0};
596 if(BOOST_UNLIKELY(limit_size > this->max_size() || preferred_size > this->max_size())){
599 std::size_t l_size = limit_size*sizeof(T);
600 std::size_t p_size = preferred_size*sizeof(T);
603 void* reuse_ptr_void = reuse_ptr;
604 ret = dlmalloc_allocation_command(command, sizeof(T), l_size, p_size, &r_size, reuse_ptr_void);
605 reuse_ptr = ret.second ? static_cast<T*>(reuse_ptr_void) : 0;
607 prefer_in_recvd_out_size = r_size/sizeof(T);
608 return (pointer)ret.first;
612 } //namespace container {
613 } //namespace boost {
615 #include <boost/container/detail/config_end.hpp>
617 #endif //#ifndef BOOST_CONTAINER_ADAPTIVE_POOL_HPP