update boost
This commit is contained in:
@@ -127,6 +127,20 @@ class segment_manager_base
|
||||
void * allocate (size_type nbytes, const std::nothrow_t &)
|
||||
{ return MemoryAlgorithm::allocate(nbytes); }
|
||||
|
||||
//!Returns a reference to the internal memory algorithm.
|
||||
//!This function is useful for custom memory algorithms that
|
||||
//!need additional configuration options after construction. Never throws.
|
||||
//!This function should be only used by advanced users.
|
||||
MemoryAlgorithm &get_memory_algorithm()
|
||||
{ return static_cast<MemoryAlgorithm&>(*this); }
|
||||
|
||||
//!Returns a const reference to the internal memory algorithm.
|
||||
//!This function is useful for custom memory algorithms that
|
||||
//!need additional configuration options after construction. Never throws.
|
||||
//!This function should be only used by advanced users.
|
||||
const MemoryAlgorithm &get_memory_algorithm() const
|
||||
{ return static_cast<const MemoryAlgorithm&>(*this); }
|
||||
|
||||
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
|
||||
|
||||
//Experimental. Dont' use.
|
||||
@@ -424,6 +438,8 @@ class segment_manager
|
||||
const void *const segm_addr = static_cast<segment_manager_base_t*>(this);
|
||||
(void)this_addr; (void)segm_addr;
|
||||
BOOST_ASSERT( this_addr == segm_addr);
|
||||
const std::size_t void_ptr_alignment = boost::move_detail::alignment_of<void_pointer>::value; (void)void_ptr_alignment;
|
||||
BOOST_ASSERT((0 == (std::size_t)this_addr % boost::move_detail::alignment_of<segment_manager>::value));
|
||||
}
|
||||
|
||||
//!Tries to find a previous named/unique allocation. Returns the address
|
||||
@@ -837,8 +853,8 @@ class segment_manager
|
||||
size_type &length, ipcdetail::true_ is_intrusive, bool use_lock)
|
||||
{
|
||||
(void)is_intrusive;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type;
|
||||
typedef typename index_type::iterator index_it;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type_t;
|
||||
typedef typename index_type_t::iterator index_it;
|
||||
|
||||
//-------------------------------
|
||||
scoped_lock<rmutex> guard(priv_get_lock(use_lock));
|
||||
@@ -874,9 +890,9 @@ class segment_manager
|
||||
size_type &length, ipcdetail::false_ is_intrusive, bool use_lock)
|
||||
{
|
||||
(void)is_intrusive;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type;
|
||||
typedef typename index_type::key_type key_type;
|
||||
typedef typename index_type::iterator index_it;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > char_aware_index_type;
|
||||
typedef typename char_aware_index_type::key_type key_type;
|
||||
typedef typename char_aware_index_type::iterator index_it;
|
||||
|
||||
//-------------------------------
|
||||
scoped_lock<rmutex> guard(priv_get_lock(use_lock));
|
||||
@@ -934,9 +950,9 @@ class segment_manager
|
||||
ipcdetail::in_place_interface &table, ipcdetail::true_ is_intrusive_index)
|
||||
{
|
||||
(void)is_intrusive_index;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type;
|
||||
typedef typename index_type::iterator index_it;
|
||||
typedef typename index_type::value_type intrusive_value_type;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type_t;
|
||||
typedef typename index_type_t::iterator index_it;
|
||||
typedef typename index_type_t::value_type intrusive_value_type;
|
||||
|
||||
//-------------------------------
|
||||
scoped_lock<rmutex> guard(m_header);
|
||||
@@ -984,9 +1000,9 @@ class segment_manager
|
||||
ipcdetail::false_ is_intrusive_index)
|
||||
{
|
||||
(void)is_intrusive_index;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type;
|
||||
typedef typename index_type::iterator index_it;
|
||||
typedef typename index_type::key_type key_type;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > char_aware_index_type;
|
||||
typedef typename char_aware_index_type::iterator index_it;
|
||||
typedef typename char_aware_index_type::key_type key_type;
|
||||
|
||||
//-------------------------------
|
||||
scoped_lock<rmutex> guard(m_header);
|
||||
@@ -1010,8 +1026,8 @@ class segment_manager
|
||||
IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > &index,
|
||||
ipcdetail::in_place_interface &table)
|
||||
{
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type;
|
||||
typedef typename index_type::iterator index_it;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > char_aware_index_type;
|
||||
typedef typename char_aware_index_type::iterator index_it;
|
||||
|
||||
//Get allocation parameters
|
||||
block_header_t *ctrl_data = reinterpret_cast<block_header_t*>
|
||||
@@ -1068,8 +1084,8 @@ class segment_manager
|
||||
, sizeof(CharT)
|
||||
, namelen);
|
||||
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type;
|
||||
typedef typename index_type::iterator index_it;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type_t;
|
||||
typedef typename index_type_t::iterator index_it;
|
||||
typedef std::pair<index_it, bool> index_ib;
|
||||
|
||||
//-------------------------------
|
||||
@@ -1088,8 +1104,8 @@ class segment_manager
|
||||
//the key (which is a smart pointer) to an equivalent one
|
||||
index_ib insert_ret;
|
||||
|
||||
typename index_type::insert_commit_data commit_data;
|
||||
typedef typename index_type::value_type intrusive_value_type;
|
||||
typename index_type_t::insert_commit_data commit_data;
|
||||
typedef typename index_type_t::value_type intrusive_value_type;
|
||||
|
||||
BOOST_TRY{
|
||||
ipcdetail::intrusive_compare_key<CharT> key(name, namelen);
|
||||
@@ -1165,7 +1181,7 @@ class segment_manager
|
||||
//if something goes wrong. This will be executed *before*
|
||||
//the memory allocation as the intrusive value is built in that
|
||||
//memory
|
||||
value_eraser<index_type> v_eraser(index, it);
|
||||
value_eraser<index_type_t> v_eraser(index, it);
|
||||
|
||||
//Construct array, this can throw
|
||||
ipcdetail::array_construct(ptr, num, table);
|
||||
@@ -1193,11 +1209,11 @@ class segment_manager
|
||||
, sizeof(CharT)
|
||||
, namelen);
|
||||
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type;
|
||||
typedef typename index_type::key_type key_type;
|
||||
typedef typename index_type::mapped_type mapped_type;
|
||||
typedef typename index_type::value_type value_type;
|
||||
typedef typename index_type::iterator index_it;
|
||||
typedef IndexType<ipcdetail::index_config<CharT, MemoryAlgorithm> > index_type_t;
|
||||
typedef typename index_type_t::key_type key_type;
|
||||
typedef typename index_type_t::mapped_type mapped_type;
|
||||
typedef typename index_type_t::value_type value_type;
|
||||
typedef typename index_type_t::iterator index_it;
|
||||
typedef std::pair<index_it, bool> index_ib;
|
||||
|
||||
//-------------------------------
|
||||
@@ -1240,7 +1256,7 @@ class segment_manager
|
||||
}
|
||||
//Initialize the node value_eraser to erase inserted node
|
||||
//if something goes wrong
|
||||
value_eraser<index_type> v_eraser(index, it);
|
||||
value_eraser<index_type_t> v_eraser(index, it);
|
||||
|
||||
//Allocates buffer for name + data, this can throw (it hurts)
|
||||
void *buffer_ptr;
|
||||
|
||||
Reference in New Issue
Block a user