diff --git a/include/boost/container/adaptive_pool.hpp b/include/boost/container/adaptive_pool.hpp index 8fcc126..b9037b7 100644 --- a/include/boost/container/adaptive_pool.hpp +++ b/include/boost/container/adaptive_pool.hpp @@ -251,7 +251,7 @@ class adaptive_pool BOOST_STATIC_ASSERT(( Version > 1 ));/* dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ + if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ boost::container::throw_bad_alloc(); } chain.incorporate_after(chain.before_begin() @@ -259,7 +259,7 @@ class adaptive_pool ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );*/ if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes - (n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ + (n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ boost::container::throw_bad_alloc(); } } @@ -271,7 +271,7 @@ class adaptive_pool BOOST_STATIC_ASSERT(( Version > 1 ));/* dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ + if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ boost::container::throw_bad_alloc(); } chain.incorporate_after(chain.before_begin() @@ -279,7 +279,7 @@ class adaptive_pool ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );*/ if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays - (n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ + (n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ boost::container::throw_bad_alloc(); } } @@ -536,7 +536,7 @@ class private_adaptive_pool { BOOST_STATIC_ASSERT(( Version > 1 )); if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes - (n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ + (n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ boost::container::throw_bad_alloc(); } } @@ -547,7 +547,7 @@ class private_adaptive_pool { BOOST_STATIC_ASSERT(( Version > 1 )); if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays - (n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ + (n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ boost::container::throw_bad_alloc(); } } diff --git a/include/boost/container/allocator.hpp b/include/boost/container/allocator.hpp index a14c59e..899f85e 100644 --- a/include/boost/container/allocator.hpp +++ b/include/boost/container/allocator.hpp @@ -287,7 +287,7 @@ class allocator BOOST_STATIC_ASSERT(( Version > 1 )); dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){ + if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){ boost::container::throw_bad_alloc(); } chain.incorporate_after(chain.before_begin() @@ -295,7 +295,7 @@ class allocator ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) ); /* - if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain))){ + if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain))){ boost::container::throw_bad_alloc(); }*/ } @@ -308,7 +308,7 @@ class allocator BOOST_STATIC_ASSERT(( Version > 1 )); dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){ + if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){ boost::container::throw_bad_alloc(); } chain.incorporate_after(chain.before_begin() @@ -316,7 +316,7 @@ class allocator ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) ); /* - if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain))){ + if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain))){ boost::container::throw_bad_alloc(); }*/ } diff --git a/include/boost/container/detail/alloc_lib.h b/include/boost/container/detail/alloc_lib.h index 950ff72..f5f505c 100644 --- a/include/boost/container/detail/alloc_lib.h +++ b/include/boost/container/detail/alloc_lib.h @@ -196,11 +196,11 @@ typedef struct boost_cont_memchain_impl /*!Indicates the all elements allocated by boost_cont_multialloc_nodes or boost_cont_multialloc_arrays must be contiguous.*/ -#define DL_MULTIALLOC_ALL_CONTIGUOUS ((size_t)(-1)) +#define BOOST_CONTAINER_DL_MULTIALLOC_ALL_CONTIGUOUS ((size_t)(-1)) /*!Indicates the number of contiguous elements allocated by boost_cont_multialloc_nodes or boost_cont_multialloc_arrays should be selected by those functions.*/ -#define DL_MULTIALLOC_DEFAULT_CONTIGUOUS ((size_t)(0)) +#define BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS ((size_t)(0)) typedef struct boost_cont_malloc_stats_impl { @@ -225,8 +225,8 @@ enum BOOST_CONTAINER_EXPAND_OR_NEW = BOOST_CONTAINER_ALLOCATE_NEW | BOOST_CONTAINER_EXPAND_BOTH }; -//#define BOOST_CONTAINERDLMALLOC__FOOTERS -#ifndef BOOST_CONTAINERDLMALLOC__FOOTERS +//#define BOOST_CONTAINER_DLMALLOC_FOOTERS +#ifndef BOOST_CONTAINER_DLMALLOC_FOOTERS enum { BOOST_CONTAINER_ALLOCATION_PAYLOAD = sizeof(size_t) }; #else enum { BOOST_CONTAINER_ALLOCATION_PAYLOAD = sizeof(size_t)*2 }; diff --git a/include/boost/container/node_allocator.hpp b/include/boost/container/node_allocator.hpp index b5c20a6..4ecb6f8 100644 --- a/include/boost/container/node_allocator.hpp +++ b/include/boost/container/node_allocator.hpp @@ -258,7 +258,7 @@ class node_allocator BOOST_STATIC_ASSERT(( Version > 1 )); dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ + if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ boost::container::throw_bad_alloc(); } chain.incorporate_after( chain.before_begin() @@ -273,7 +273,7 @@ class node_allocator { BOOST_STATIC_ASSERT(( Version > 1 )); dlmalloc_memchain ch; - dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch); + dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch); if(BOOST_UNLIKELY(BOOST_CONTAINER_MEMCHAIN_EMPTY(&ch))){ boost::container::throw_bad_alloc(); } diff --git a/include/boost/container/stable_vector.hpp b/include/boost/container/stable_vector.hpp index 7d0c9b3..482c0cf 100644 --- a/include/boost/container/stable_vector.hpp +++ b/include/boost/container/stable_vector.hpp @@ -434,13 +434,13 @@ class stable_vector_iterator #if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING) - #define STABLE_VECTOR_CHECK_INVARIANT \ + #define BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT \ invariant_checker BOOST_JOIN(check_invariant_,__LINE__)(*this); \ BOOST_JOIN(check_invariant_,__LINE__).touch(); #else //STABLE_VECTOR_ENABLE_INVARIANT_CHECKING - #define STABLE_VECTOR_CHECK_INVARIANT + #define BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT #endif //#if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING) @@ -604,7 +604,7 @@ class stable_vector BOOST_CONTAINER_FORCEINLINE stable_vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value) : internal_data(), index() { - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; } //! Effects: Constructs a stable_vector taking the allocator as parameter. @@ -615,7 +615,7 @@ class stable_vector BOOST_CONTAINER_FORCEINLINE explicit stable_vector(const allocator_type& al) BOOST_NOEXCEPT_OR_NOTHROW : internal_data(al), index(al) { - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; } //! Effects: Constructs a stable_vector @@ -630,7 +630,7 @@ class stable_vector { stable_vector_detail::clear_on_destroy cod(*this); this->resize(n); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } @@ -648,7 +648,7 @@ class stable_vector { stable_vector_detail::clear_on_destroy cod(*this); this->resize(n, default_init); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } @@ -664,7 +664,7 @@ class stable_vector { stable_vector_detail::clear_on_destroy cod(*this); this->resize(n); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } @@ -682,7 +682,7 @@ class stable_vector { stable_vector_detail::clear_on_destroy cod(*this); this->resize(n, default_init); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } @@ -698,7 +698,7 @@ class stable_vector { stable_vector_detail::clear_on_destroy cod(*this); this->insert(this->cend(), n, t); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } @@ -715,7 +715,7 @@ class stable_vector { stable_vector_detail::clear_on_destroy cod(*this); this->insert(this->cend(), first, last); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } @@ -732,7 +732,7 @@ class stable_vector { stable_vector_detail::clear_on_destroy cod(*this); this->insert(this->cend(), x.begin(), x.end()); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } @@ -749,7 +749,7 @@ class stable_vector { stable_vector_detail::clear_on_destroy cod(*this); insert(cend(), il.begin(), il.end()); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } #endif @@ -775,7 +775,7 @@ class stable_vector { stable_vector_detail::clear_on_destroy cod(*this); this->insert(this->cend(), x.begin(), x.end()); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } @@ -795,7 +795,7 @@ class stable_vector else{ stable_vector_detail::clear_on_destroy cod(*this); this->insert(this->cend(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end())); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; cod.release(); } } @@ -822,7 +822,7 @@ class stable_vector //! Complexity: Linear to the number of elements in x. stable_vector& operator=(BOOST_COPY_ASSIGN_REF(stable_vector) x) { - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; if (BOOST_LIKELY(this != &x)) { node_allocator_type &this_alloc = this->priv_node_alloc(); const node_allocator_type &x_alloc = x.priv_node_alloc(); @@ -865,7 +865,7 @@ class stable_vector //Resources can be transferred if both allocators are //going to be equal after this function (either propagated or already equal) if(propagate_alloc || allocators_equal){ - STABLE_VECTOR_CHECK_INVARIANT + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT //Destroy objects but retain memory in case x reuses it in the future this->clear(); //Move allocator if needed @@ -889,7 +889,7 @@ class stable_vector //! Complexity: Linear to the range [il.begin(), il.end()). stable_vector& operator=(std::initializer_list il) { - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; assign(il.begin(), il.end()); return *this; } @@ -920,7 +920,7 @@ class stable_vector #endif assign(InputIterator first,InputIterator last) { - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; iterator first1 = this->begin(); iterator last1 = this->end(); for ( ; first1 != last1 && first != last; ++first1, ++first) @@ -941,7 +941,7 @@ class stable_vector //! BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list il) { - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; assign(il.begin(), il.end()); } #endif @@ -1124,7 +1124,7 @@ class stable_vector void resize(size_type n) { typedef value_init_construct_iterator value_init_iterator; - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; if(n > this->size()) this->insert(this->cend(), value_init_iterator(n - this->size()), value_init_iterator()); else if(n < this->size()) @@ -1142,7 +1142,7 @@ class stable_vector void resize(size_type n, default_init_t) { typedef default_init_construct_iterator default_init_iterator; - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; if(n > this->size()) this->insert(this->cend(), default_init_iterator(n - this->size()), default_init_iterator()); else if(n < this->size()) @@ -1157,7 +1157,7 @@ class stable_vector //! Complexity: Linear to the difference between size() and new_size. void resize(size_type n, const T& t) { - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; if(n > this->size()) this->insert(this->cend(), n - this->size(), t); else if(n < this->size()) @@ -1190,7 +1190,7 @@ class stable_vector //! Throws: If memory allocation allocation throws. void reserve(size_type n) { - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; if(n > this->max_size()){ throw_length_error("stable_vector::reserve max_size() exceeded"); } @@ -1562,7 +1562,7 @@ class stable_vector iterator insert(const_iterator p, size_type n, const T& t) { BOOST_ASSERT(this->priv_in_range_or_end(p)); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; typedef constant_iterator cvalue_iterator; return this->insert(p, cvalue_iterator(t, n), cvalue_iterator()); } @@ -1579,7 +1579,7 @@ class stable_vector BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, std::initializer_list il) { //Position checks done by insert() - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; return insert(p, il.begin(), il.end()); } #endif @@ -1608,7 +1608,7 @@ class stable_vector ) { BOOST_ASSERT(this->priv_in_range_or_end(p)); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; const size_type pos_n = p - this->cbegin(); for(; first != last; ++first){ this->emplace(p, *first); @@ -1678,7 +1678,7 @@ class stable_vector BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->priv_in_range(p)); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; const size_type d = p - this->cbegin(); index_iterator it = this->index.begin() + d; this->priv_delete_node(p.node_pointer()); @@ -1697,7 +1697,7 @@ class stable_vector { BOOST_ASSERT(first == last || (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last))); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; const const_iterator cbeg(this->cbegin()); const size_type d1 = static_cast(first - cbeg), d2 = static_cast(last - cbeg); @@ -1733,7 +1733,7 @@ class stable_vector BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value || allocator_traits_type::is_always_equal::value || this->get_stored_allocator() == x.get_stored_allocator()); - STABLE_VECTOR_CHECK_INVARIANT; + BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; dtl::bool_ flag; dtl::swap_alloc(this->priv_node_alloc(), x.priv_node_alloc(), flag); //vector's allocator is swapped here @@ -2174,7 +2174,7 @@ stable_vector(InputIterator, InputIterator, Allocator const&) -> #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -#undef STABLE_VECTOR_CHECK_INVARIANT +#undef BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT } //namespace container { diff --git a/src/dlmalloc_ext_2_8_6.c b/src/dlmalloc_ext_2_8_6.c index 918ce02..0b0101c 100644 --- a/src/dlmalloc_ext_2_8_6.c +++ b/src/dlmalloc_ext_2_8_6.c @@ -791,21 +791,21 @@ static int internal_node_multialloc /*Error if wrong element_size parameter */ if (!element_size || /*OR Error if n_elements less than contiguous_elements */ - ((contiguous_elements + 1) > (DL_MULTIALLOC_DEFAULT_CONTIGUOUS + 1) && n_elements < contiguous_elements) || + ((contiguous_elements + 1) > (BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS + 1) && n_elements < contiguous_elements) || /* OR Error if integer overflow */ (SQRT_MAX_SIZE_T < (element_req_size | contiguous_elements) && (MAX_SIZE_T / element_req_size) < contiguous_elements)) { return 0; } switch (contiguous_elements) { - case DL_MULTIALLOC_DEFAULT_CONTIGUOUS: + case BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS: { /* Default contiguous, just check that we can store at least one element */ elements_per_segment = INTERNAL_MULTIALLOC_DEFAULT_CONTIGUOUS_MEM / element_req_size; elements_per_segment += (size_t)(!elements_per_segment); } break; - case DL_MULTIALLOC_ALL_CONTIGUOUS: + case BOOST_CONTAINER_DL_MULTIALLOC_ALL_CONTIGUOUS: /* All elements should be allocated in a single call */ elements_per_segment = n_elements; break; @@ -1002,11 +1002,11 @@ static int internal_multialloc_arrays max_size = MAX_REQUEST/element_size; /* Different sizes*/ switch(contiguous_elements){ - case DL_MULTIALLOC_DEFAULT_CONTIGUOUS: + case BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS: /* Use default contiguous mem */ boost_cont_multialloc_segmented_malloc_size = INTERNAL_MULTIALLOC_DEFAULT_CONTIGUOUS_MEM; break; - case DL_MULTIALLOC_ALL_CONTIGUOUS: + case BOOST_CONTAINER_DL_MULTIALLOC_ALL_CONTIGUOUS: boost_cont_multialloc_segmented_malloc_size = MAX_REQUEST + CHUNK_OVERHEAD; break; default: diff --git a/test/alloc_full_test.cpp b/test/alloc_full_test.cpp index 54e1160..5e72536 100644 --- a/test/alloc_full_test.cpp +++ b/test/alloc_full_test.cpp @@ -512,7 +512,7 @@ bool test_many_equal_allocation() for(int i = 0; i != NumIt/10; ++i){ dlmalloc_memchain chain; BOOST_CONTAINER_MEMCHAIN_INIT(&chain); - dlmalloc_multialloc_nodes((i+1)*2, i+1, DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &chain); + dlmalloc_multialloc_nodes((i+1)*2, i+1, BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &chain); dlmalloc_memchain_it it = BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(&chain); if(BOOST_CONTAINER_MEMCHAIN_IS_END_IT(chain, it)) break; @@ -624,7 +624,7 @@ bool test_many_different_allocation() for(int i = 0; i != NumIt; ++i){ dlmalloc_memchain chain; BOOST_CONTAINER_MEMCHAIN_INIT(&chain); - dlmalloc_multialloc_arrays(ArraySize, requested_sizes, 1, DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &chain); + dlmalloc_multialloc_arrays(ArraySize, requested_sizes, 1, BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &chain); dlmalloc_memchain_it it = BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(&chain); if(BOOST_CONTAINER_MEMCHAIN_IS_END_IT(chain, it)) break; @@ -702,7 +702,7 @@ bool test_many_deallocation() for(int i = 0; i != NumIt; ++i){ dlmalloc_memchain chain; BOOST_CONTAINER_MEMCHAIN_INIT(&chain); - dlmalloc_multialloc_arrays(ArraySize, requested_sizes, 1, DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &chain); + dlmalloc_multialloc_arrays(ArraySize, requested_sizes, 1, BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &chain); dlmalloc_memchain_it it = BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(&chain); if(BOOST_CONTAINER_MEMCHAIN_IS_END_IT(chain, it)) return false; @@ -720,7 +720,7 @@ bool test_many_deallocation() for(int i = 0; i != NumIt; ++i){ dlmalloc_memchain chain; BOOST_CONTAINER_MEMCHAIN_INIT(&chain); - dlmalloc_multialloc_nodes(ArraySize, i*4+1, DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &chain); + dlmalloc_multialloc_nodes(ArraySize, i*4+1, BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &chain); dlmalloc_memchain_it it = BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(&chain); if(BOOST_CONTAINER_MEMCHAIN_IS_END_IT(chain, it)) return false; diff --git a/test/flat_map_test.cpp b/test/flat_map_test.cpp index f5caff7..e2042c2 100644 --- a/test/flat_map_test.cpp +++ b/test/flat_map_test.cpp @@ -7,8 +7,6 @@ // See http://www.boost.org/libs/container for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include - #include #include @@ -834,5 +832,3 @@ int main() return 0; } - -#include diff --git a/test/throw_exception_test.cpp b/test/throw_exception_test.cpp index 07a45eb..6e61ceb 100644 --- a/test/throw_exception_test.cpp +++ b/test/throw_exception_test.cpp @@ -9,8 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #define BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS -#include - #include #include @@ -74,7 +72,5 @@ int main() //Check user-defined throw callbacks are called throw_bad_alloc(); //Never reached - std::abort(); + return 33; } - -#include