src/cxx_supportlib/vendor-modified/boost/pool/pool.hpp in passenger-5.0.24 vs src/cxx_supportlib/vendor-modified/boost/pool/pool.hpp in passenger-5.0.25
- old
+ new
@@ -24,12 +24,12 @@
// std::max
#include <algorithm>
#include <boost/pool/poolfwd.hpp>
-// boost::math::static_lcm
-#include <boost/math/common_factor_ct.hpp>
+// boost::integer::static_lcm
+#include <boost/integer/common_factor_ct.hpp>
// boost::simple_segregated_storage
#include <boost/pool/simple_segregated_storage.hpp>
// boost::alignment_of
#include <boost/type_traits/alignment_of.hpp>
// BOOST_ASSERT
@@ -160,11 +160,11 @@
return (ptr + sz - sizeof(size_type));
}
char * ptr_next_ptr() const
{
return (ptr_next_size() -
- math::static_lcm<sizeof(size_type), sizeof(void *)>::value);
+ integer::static_lcm<sizeof(size_type), sizeof(void *)>::value);
}
public:
PODptr(char * const nptr, const size_type nsize)
:ptr(nptr), sz(nsize)
@@ -210,11 +210,11 @@
return sz;
}
size_type element_size() const
{ //! \returns size of element pointer area.
return static_cast<size_type>(sz - sizeof(size_type) -
- math::static_lcm<sizeof(size_type), sizeof(void *)>::value);
+ integer::static_lcm<sizeof(size_type), sizeof(void *)>::value);
}
size_type & next_size() const
{ //!
//! \returns next_size.
@@ -283,13 +283,13 @@
typedef typename UserAllocator::size_type size_type; //!< An unsigned integral type that can represent the size of the largest object to be allocated.
typedef typename UserAllocator::difference_type difference_type; //!< A signed integral type that can represent the difference of any two pointers.
private:
BOOST_STATIC_CONSTANT(size_type, min_alloc_size =
- (::boost::math::static_lcm<sizeof(void *), sizeof(size_type)>::value) );
+ (::boost::integer::static_lcm<sizeof(void *), sizeof(size_type)>::value) );
BOOST_STATIC_CONSTANT(size_type, min_align =
- (::boost::math::static_lcm< ::boost::alignment_of<void *>::value, ::boost::alignment_of<size_type>::value>::value) );
+ (::boost::integer::static_lcm< ::boost::alignment_of<void *>::value, ::boost::alignment_of<size_type>::value>::value) );
//! \returns 0 if out-of-memory.
//! Called if malloc/ordered_malloc needs to resize the free list.
void * malloc_need_resize(); //! Called if malloc needs to resize the free list.
void * ordered_malloc_need_resize(); //! Called if ordered_malloc needs to resize the free list.
@@ -687,20 +687,20 @@
{ //! No memory in any of our storages; make a new storage,
//! Allocates chunk in newly malloc aftert resize.
//! \returns pointer to chunk.
size_type partition_size = alloc_size();
size_type POD_size = static_cast<size_type>(next_size * partition_size +
- math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
+ integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
char * ptr = (UserAllocator::malloc)(POD_size);
if (ptr == 0)
{
if(next_size > 4)
{
next_size >>= 1;
partition_size = alloc_size();
POD_size = static_cast<size_type>(next_size * partition_size +
- math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
+ integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
ptr = (UserAllocator::malloc)(POD_size);
}
if(ptr == 0)
return 0;
}
@@ -727,20 +727,20 @@
void * pool<UserAllocator>::ordered_malloc_need_resize()
{ //! No memory in any of our storages; make a new storage,
//! \returns pointer to new chunk.
size_type partition_size = alloc_size();
size_type POD_size = static_cast<size_type>(next_size * partition_size +
- math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
+ integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
char * ptr = (UserAllocator::malloc)(POD_size);
if (ptr == 0)
{
if(next_size > 4)
{
next_size >>= 1;
partition_size = alloc_size();
POD_size = static_cast<size_type>(next_size * partition_size +
- math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
+ integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
ptr = (UserAllocator::malloc)(POD_size);
}
if(ptr == 0)
return 0;
}
@@ -812,21 +812,21 @@
// Not enough memory in our storages; make a new storage,
BOOST_USING_STD_MAX();
next_size = max BOOST_PREVENT_MACRO_SUBSTITUTION(next_size, num_chunks);
size_type POD_size = static_cast<size_type>(next_size * partition_size +
- math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
+ integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
char * ptr = (UserAllocator::malloc)(POD_size);
if (ptr == 0)
{
if(num_chunks < next_size)
{
// Try again with just enough memory to do the job, or at least whatever we
// allocated last time:
next_size >>= 1;
next_size = max BOOST_PREVENT_MACRO_SUBSTITUTION(next_size, num_chunks);
POD_size = static_cast<size_type>(next_size * partition_size +
- math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
+ integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type));
ptr = (UserAllocator::malloc)(POD_size);
}
if(ptr == 0)
return 0;
}