Update of /cvsroot/boost/boost/boost/interprocess
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17964
Modified Files:
managed_shared_memory.hpp mapped_region.hpp
segment_manager.hpp
Log Message:
Corrected gcc bug in release mode
Index: managed_shared_memory.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/managed_shared_memory.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- managed_shared_memory.hpp 12 May 2007 12:54:15 -0000 1.5
+++ managed_shared_memory.hpp 23 May 2007 15:47:54 -0000 1.6
@@ -42,10 +42,13 @@
>
class basic_managed_shared_memory
: public detail::basic_managed_memory_impl <CharType, AllocationAlgorithm,
IndexType>
+ , private detail::managed_open_or_create_impl<shared_memory_object>
{
/// @cond
typedef detail::basic_managed_memory_impl
<CharType, AllocationAlgorithm, IndexType> base_t;
+ typedef detail::managed_open_or_create_impl
+ <shared_memory_object> base2_t;
typedef detail::create_open_func<base_t> create_open_func_t;
@@ -64,7 +67,8 @@
//!This can throw.
basic_managed_shared_memory(detail::create_only_t create_only, const char
*name,
std::size_t size, const void *addr = 0)
- : m_shmem(create_only, name, size, read_write, addr,
+ : base_t()
+ , base2_t(create_only, name, size, read_write, addr,
create_open_func_t(get_this_pointer(), DoCreate))
{}
@@ -75,7 +79,8 @@
basic_managed_shared_memory (detail::open_or_create_t open_or_create,
const char *name, std::size_t size,
const void *addr = 0)
- : m_shmem(open_or_create, name, size, read_write, addr,
+ : base_t()
+ , base2_t(open_or_create, name, size, read_write, addr,
create_open_func_t(get_this_pointer(),
DoCreateOrOpen))
{}
@@ -84,7 +89,8 @@
//!Never throws.
basic_managed_shared_memory (detail::open_only_t open_only, const char*
name,
const void *addr = 0)
- : m_shmem(open_only, name, read_write, addr,
+ : base_t()
+ , base2_t(open_only, name, read_write, addr,
create_open_func_t(get_this_pointer(),
DoOpen))
{}
@@ -104,13 +110,8 @@
void swap(basic_managed_shared_memory &other)
{
base_t::swap(other);
- m_shmem.swap(other.m_shmem);
+ base2_t::swap(other);
}
-
- /// @cond
- private:
- detail::managed_open_or_create_impl<shared_memory_object> m_shmem;
- /// @endcond
};
} //namespace interprocess {
Index: mapped_region.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/mapped_region.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mapped_region.hpp 12 May 2007 12:54:15 -0000 1.3
+++ mapped_region.hpp 23 May 2007 15:47:54 -0000 1.4
@@ -128,21 +128,6 @@
inline void swap(mapped_region &x, mapped_region &y)
{ x.swap(y); }
-inline mapped_region::mapped_region()
- : m_base(0), m_size(0), m_offset(0), m_extra_offset(0)
- #if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
- , m_file_mapping_hnd(0)
- #endif
-{}
-
-inline mapped_region::mapped_region(detail::moved_object<mapped_region> other)
- : m_base(0), m_size(0), m_offset(0)
- , m_extra_offset(0)
- #if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
- , m_file_mapping_hnd(0)
- #endif
-{ this->swap(other.get()); }
-
inline mapped_region
&mapped_region::operator=(detail::moved_object<mapped_region> other)
{ this->swap(other.get()); return *this; }
@@ -160,6 +145,17 @@
#if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
+inline mapped_region::mapped_region()
+ : m_base(0), m_size(0), m_offset(0), m_extra_offset(0)
+ , m_file_mapping_hnd(0)
+{}
+
+inline mapped_region::mapped_region(detail::moved_object<mapped_region> other)
+ : m_base(0), m_size(0), m_offset(0)
+ , m_extra_offset(0)
+ , m_file_mapping_hnd(0)
+{ this->swap(other.get()); }
+
template<int dummy>
inline std::size_t mapped_region::page_size_holder<dummy>::get_page_size()
{
@@ -176,9 +172,7 @@
,std::size_t size
,const void *address)
: m_base(0), m_size(0), m_offset(0), m_extra_offset(0)
- #if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
, m_file_mapping_hnd(0)
- #endif
{
mapping_handle_t mhandle = mapping.get_mapping_handle();
file_handle_t native_mapping_handle;
@@ -337,6 +331,15 @@
#else //#if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
+inline mapped_region::mapped_region()
+ : m_base(MAP_FAILED), m_size(0), m_offset(0), m_extra_offset(0)
+{}
+
+inline mapped_region::mapped_region(detail::moved_object<mapped_region> other)
+ : m_base(MAP_FAILED), m_size(0), m_offset(0)
+ , m_extra_offset(0)
+{ this->swap(other.get()); }
+
template<int dummy>
inline std::size_t mapped_region::page_size_holder<dummy>::get_page_size()
{ return std::size_t(sysconf(_SC_PAGESIZE)); }
Index: segment_manager.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/segment_manager.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- segment_manager.hpp 12 May 2007 12:54:15 -0000 1.5
+++ segment_manager.hpp 23 May 2007 15:47:54 -0000 1.6
@@ -18,7 +18,6 @@
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
-#include <boost/config.hpp>
#include <boost/detail/no_exceptions_support.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/type_traits/has_trivial_destructor.hpp>
@@ -30,7 +29,6 @@
#include <boost/interprocess/detail/named_proxy.hpp>
#include <boost/interprocess/detail/utilities.hpp>
#include <boost/interprocess/offset_ptr.hpp>
[...1397 lines suppressed...]
- //Build scoped ptr to avoid leaks with constructor exception
- boost::interprocess::scoped_ptr<void, raw_deleter_t> mem(ptr_struct,
*this);
-
- //Now construct the header
- block_header_t * hdr = new(ptr_struct) block_header_t(block_info);
- T *ptr = static_cast<T*>(hdr->value());
-
- if(!CtorFunc::is_trivial){
- //Construct array, this can throw
- priv_array_construct<CtorFunc>(ptr, num, ctor);
- }
-
- //All constructors successful, we don't want erase memory
- mem.release();
- return ptr;
- }
-
private:
/*!Returns the this pointer*/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs