Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52416 - in trunk/libs: interprocess/doc interprocess/example intrusive/doc
From: igaztanaga_at_[hidden]
Date: 2009-04-16 03:05:10


Author: igaztanaga
Date: 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
New Revision: 52416
URL: http://svn.boost.org/trac/boost/changeset/52416

Log:
Fixed C++0x and MacOS X bugs
Text files modified:
   trunk/libs/interprocess/doc/interprocess.qbk | 15 ++++++++++++---
   trunk/libs/interprocess/example/doc_adaptive_pool.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_allocator.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_bufferstream.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_cached_adaptive_pool.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_cached_node_allocator.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_cont.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_intrusive.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_ipc_message.cpp | 2 +-
   trunk/libs/interprocess/example/doc_managed_aligned_allocation.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_managed_allocation_command.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_managed_construction_info.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_managed_multiple_allocation.cpp | 23 +++++++++++++++++++++--
   trunk/libs/interprocess/example/doc_managed_raw_allocation.cpp | 22 +++++++++++++++++++++-
   trunk/libs/interprocess/example/doc_map.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_move_containers.cpp | 20 ++++++++++++++++++++
   trunk/libs/interprocess/example/doc_spawn_vector.cpp | 2 +-
   trunk/libs/interprocess/example/doc_windows_shared_memory.cpp | 3 +++
   trunk/libs/intrusive/doc/Jamfile.v2 | 1 -
   19 files changed, 299 insertions(+), 9 deletions(-)

Modified: trunk/libs/interprocess/doc/interprocess.qbk
==============================================================================
--- trunk/libs/interprocess/doc/interprocess.qbk (original)
+++ trunk/libs/interprocess/doc/interprocess.qbk 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -3058,7 +3058,11 @@
    // to implement managed features.
    //!! If anything fails, throws interprocess_exception
    //
- managed_shared_memory segment (create_only, "MySharedMemory", //Shared memory object name 65536); //Shared memory object size in bytes
+ managed_shared_memory segment ( create_only
+ , "MySharedMemory" //Shared memory object name
+ , 65536); //Shared memory object size in bytes
+
+
 [c++]
 
    //1. Opens a shared memory object
@@ -3069,7 +3073,8 @@
    // to implement managed features.
    //!! If anything fails, throws interprocess_exception
    //
- managed_shared_memory segment (open_only, "MySharedMemory");//Shared memory object name[c++]
+ managed_shared_memory segment (open_only, "MySharedMemory");//Shared memory object name
+
 
 [c++]
 
@@ -3078,7 +3083,11 @@
    //2. Otherwise, equivalent to "open_only" (size is ignored)
    //!! If anything fails, throws interprocess_exception
    //
- managed_shared_memory segment (open_or_create, "MySharedMemory", //Shared memory object name 65536); //Shared memory object size in bytes
+ managed_shared_memory segment ( open_or_create
+ , "MySharedMemory" //Shared memory object name
+ , 65536); //Shared memory object size in bytes
+
+
 When the `managed_shared_memory` object is destroyed, the shared memory
 object is automatically unmapped, and all the resources are freed. To remove
 the shared memory object from the system you must use the `shared_memory_object::remove`

Modified: trunk/libs/interprocess/example/doc_adaptive_pool.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_adaptive_pool.cpp (original)
+++ trunk/libs/interprocess/example/doc_adaptive_pool.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -13,6 +13,9 @@
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/allocators/adaptive_pool.hpp>
 #include <cassert>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 using namespace boost::interprocess;
 
@@ -21,14 +24,31 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Create shared memory
+ //<-
+ #if 1
+ managed_shared_memory segment(create_only,test::get_process_id_name(), 65536);
+ #else
+ //->
    managed_shared_memory segment(create_only,
                                  "MySharedMemory", //segment name
                                  65536);
+ //<-
+ #endif
+ //->
 
    //Create a adaptive_pool that allocates ints from the managed segment
    //The number of chunks per segment is the default value

Modified: trunk/libs/interprocess/example/doc_allocator.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_allocator.cpp (original)
+++ trunk/libs/interprocess/example/doc_allocator.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -13,6 +13,9 @@
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <cassert>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 using namespace boost::interprocess;
 
@@ -21,14 +24,31 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Create shared memory
+ //<-
+ #if 1
+ managed_shared_memory segment(create_only,test::get_process_id_name(), 65536);
+ #else
+ //->
    managed_shared_memory segment(create_only,
                                  "MySharedMemory", //segment name
                                  65536);
+ //<-
+ #endif
+ //->
 
    //Create an allocator that allocates ints from the managed segment
    allocator<int, managed_shared_memory::segment_manager>

Modified: trunk/libs/interprocess/example/doc_bufferstream.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_bufferstream.cpp (original)
+++ trunk/libs/interprocess/example/doc_bufferstream.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -15,6 +15,9 @@
 #include <vector>
 #include <iterator>
 #include <cstddef>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 using namespace boost::interprocess;
 
@@ -23,14 +26,31 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Create shared memory
+ //<-
+ #if 1
+ managed_shared_memory segment(create_only,test::get_process_id_name(), 65536);
+ #else
+ //->
    managed_shared_memory segment(create_only,
                                  "MySharedMemory", //segment name
                                  65536);
+ //<-
+ #endif
+ //->
 
    //Fill data
    std::vector<int> data;

Modified: trunk/libs/interprocess/example/doc_cached_adaptive_pool.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_cached_adaptive_pool.cpp (original)
+++ trunk/libs/interprocess/example/doc_cached_adaptive_pool.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -13,6 +13,9 @@
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/allocators/cached_adaptive_pool.hpp>
 #include <cassert>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 using namespace boost::interprocess;
 
@@ -21,14 +24,31 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Create shared memory
+ //<-
+ #if 1
+ managed_shared_memory segment(create_only,test::get_process_id_name(), 65536);
+ #else
+ //->
    managed_shared_memory segment(create_only,
                                  "MySharedMemory", //segment name
                                  65536);
+ //<-
+ #endif
+ //->
 
    //Create a cached_adaptive_pool that allocates ints from the managed segment
    //The number of chunks per segment is the default value

Modified: trunk/libs/interprocess/example/doc_cached_node_allocator.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_cached_node_allocator.cpp (original)
+++ trunk/libs/interprocess/example/doc_cached_node_allocator.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -13,6 +13,9 @@
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/allocators/cached_node_allocator.hpp>
 #include <cassert>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 using namespace boost::interprocess;
 
@@ -21,14 +24,31 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Create shared memory
+ //<-
+ #if 1
+ managed_shared_memory segment(create_only, test::get_process_id_name(), 65536);
+ #else
+ //->
    managed_shared_memory segment(create_only,
                                  "MySharedMemory", //segment name
                                  65536);
+ //<-
+ #endif
+ //->
 
    //Create a cached_node_allocator that allocates ints from the managed segment
    //The number of chunks per segment is the default value

Modified: trunk/libs/interprocess/example/doc_cont.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_cont.cpp (original)
+++ trunk/libs/interprocess/example/doc_cont.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -13,6 +13,9 @@
 #include <boost/interprocess/containers/vector.hpp>
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <boost/interprocess/managed_shared_memory.hpp>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 int main ()
 {
@@ -20,15 +23,32 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //A managed shared memory where we can construct objects
    //associated with a c-string
+ //<-
+ #if 1
+ managed_shared_memory segment(create_only,test::get_process_id_name(), 65536);
+ #else
+ //->
    managed_shared_memory segment(create_only,
                                  "MySharedMemory", //segment name
                                  65536);
+ //<-
+ #endif
+ //->
 
    //Alias an STL-like allocator of ints that allocates ints from the segment
    typedef allocator<int, managed_shared_memory::segment_manager>

Modified: trunk/libs/interprocess/example/doc_intrusive.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_intrusive.cpp (original)
+++ trunk/libs/interprocess/example/doc_intrusive.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -13,6 +13,9 @@
 //[doc_intrusive
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/smart_ptr/intrusive_ptr.hpp>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 using namespace boost::interprocess;
 
@@ -74,12 +77,29 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Create shared memory
+ //<-
+ #if 1
+ managed_shared_memory shmem(create_only, test::get_process_id_name(), 10000);
+ #else
+ //->
    managed_shared_memory shmem(create_only, "MySharedMemory", 10000);
+ //<-
+ #endif
+ //->
 
    //Create the unique reference counted object in shared memory
    N::reference_counted_class *ref_counted =

Modified: trunk/libs/interprocess/example/doc_ipc_message.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_ipc_message.cpp (original)
+++ trunk/libs/interprocess/example/doc_ipc_message.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -9,7 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
-//[run_ipc_message
+//[doc_ipc_message
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <cstdlib> //std::system
 #include <sstream>

Modified: trunk/libs/interprocess/example/doc_managed_aligned_allocation.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_aligned_allocation.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_aligned_allocation.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -11,6 +11,9 @@
 //[doc_managed_aligned_allocation
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <cassert>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 int main()
 {
@@ -19,13 +22,30 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Managed memory segment that allocates portions of a shared memory
    //segment with the default management algorithm
+ //<-
+ #if 1
+ managed_shared_memory managed_shm(create_only, test::get_process_id_name(), 65536);
+ #else
+ //->
    managed_shared_memory managed_shm(create_only, "MySharedMemory", 65536);
+ //<-
+ #endif
+ //->
 
    const std::size_t Alignment = 128;
 

Modified: trunk/libs/interprocess/example/doc_managed_allocation_command.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_allocation_command.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_allocation_command.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -11,6 +11,9 @@
 //[doc_managed_allocation_command
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <cassert>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 int main()
 {
@@ -19,13 +22,30 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Managed memory segment that allocates portions of a shared memory
    //segment with the default management algorithm
+ //<-
+ #if 1
+ managed_shared_memory managed_shm(create_only, test::get_process_id_name(), 10000*sizeof(std::size_t));
+ #else
+ //->
    managed_shared_memory managed_shm(create_only, "MySharedMemory", 10000*sizeof(std::size_t));
+ //<-
+ #endif
+ //->
 
    //Allocate at least 100 bytes, 1000 bytes if possible
    std::size_t received_size, min_size = 100, preferred_size = 1000;

Modified: trunk/libs/interprocess/example/doc_managed_construction_info.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_construction_info.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_construction_info.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -12,6 +12,9 @@
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <cassert>
 #include <cstring>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 class my_class
 {
@@ -25,11 +28,28 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
+ //<-
+ #if 1
+ managed_shared_memory managed_shm(create_only, test::get_process_id_name(), 10000*sizeof(std::size_t));
+ #else
+ //->
    managed_shared_memory managed_shm(create_only, "MySharedMemory", 10000*sizeof(std::size_t));
+ //<-
+ #endif
+ //->
 
    //Construct objects
    my_class *named_object = managed_shm.construct<my_class>("Object name")[1]();

Modified: trunk/libs/interprocess/example/doc_managed_multiple_allocation.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_multiple_allocation.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_multiple_allocation.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -15,7 +15,9 @@
 #include <cstring>//std::memset
 #include <new> //std::nothrow
 #include <vector> //std::vector
-
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 int main()
 {
@@ -25,11 +27,28 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
- managed_shared_memory managed_shm(create_only, "MySharedMemory", 65536);
+ //<-
+ #if 1
+ managed_shared_memory managed_shm(create_only,test::get_process_id_name(), 65536);
+ #else
+ //->
+ managed_shared_memory managed_shm(create_only,"MySharedMemory", 65536);
+ //<-
+ #endif
+ //->
 
    //Allocate 16 elements of 100 bytes in a single call. Non-throwing version.
    multiallocation_chain chain(managed_shm.allocate_many(100, 16, std::nothrow));

Modified: trunk/libs/interprocess/example/doc_managed_raw_allocation.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_raw_allocation.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_raw_allocation.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -10,6 +10,9 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 //[doc_managed_raw_allocation
 #include <boost/interprocess/managed_shared_memory.hpp>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 int main()
 {
@@ -18,13 +21,30 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Managed memory segment that allocates portions of a shared memory
    //segment with the default management algorithm
- managed_shared_memory managed_shm(create_only, "MySharedMemory", 65536);
+ //<-
+ #if 1
+ managed_shared_memory managed_shm(create_only,test::get_process_id_name(), 65536);
+ #else
+ //->
+ managed_shared_memory managed_shm(create_only,"MySharedMemory", 65536);
+ //<-
+ #endif
+ //->
 
    //Allocate 100 bytes of memory from segment, throwing version
    void *ptr = managed_shm.allocate(100);

Modified: trunk/libs/interprocess/example/doc_map.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_map.cpp (original)
+++ trunk/libs/interprocess/example/doc_map.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -15,6 +15,9 @@
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <functional>
 #include <utility>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 int main ()
 {
@@ -23,17 +26,34 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
    //Shared memory front-end that is able to construct objects
    //associated with a c-string. Erase previous shared memory with the name
    //to be used and create the memory segment at the specified address and initialize resources
+ //<-
+ #if 1
+ managed_shared_memory segment(create_only,test::get_process_id_name(), 65536);
+ #else
+ //->
    managed_shared_memory segment
       (create_only
       ,"MySharedMemory" //segment name
       ,65536); //segment size in bytes
+ //<-
+ #endif
+ //->
 
    //Note that map<Key, MappedType>'s value_type is std::pair<const Key, MappedType>,
    //so the allocator must allocate that pair.

Modified: trunk/libs/interprocess/example/doc_move_containers.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_move_containers.cpp (original)
+++ trunk/libs/interprocess/example/doc_move_containers.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -15,6 +15,9 @@
 #include <boost/interprocess/containers/string.hpp>
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <cassert>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 int main ()
 {
@@ -31,11 +34,28 @@
    //Remove shared memory on construction and destruction
    struct shm_remove
    {
+ //<-
+ #if 1
+ shm_remove() { shared_memory_object::remove(test::get_process_id_name()); }
+ ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); }
+ #else
+ //->
       shm_remove() { shared_memory_object::remove("MySharedMemory"); }
       ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
+ //<-
+ #endif
+ //->
    } remover;
 
+ //<-
+ #if 1
+ managed_shared_memory shm(create_only, test::get_process_id_name(), 65536);
+ #else
+ //->
    managed_shared_memory shm(create_only, "MySharedMemory", 10000);
+ //<-
+ #endif
+ //->
 
    //Create allocators
    CharAllocator charallocator (shm.get_segment_manager());

Modified: trunk/libs/interprocess/example/doc_spawn_vector.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_spawn_vector.cpp (original)
+++ trunk/libs/interprocess/example/doc_spawn_vector.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -9,7 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
-//[run_doc_spawn_vector
+//[doc_spawn_vector
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/containers/vector.hpp>
 #include <boost/interprocess/allocators/allocator.hpp>

Modified: trunk/libs/interprocess/example/doc_windows_shared_memory.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_windows_shared_memory.cpp (original)
+++ trunk/libs/interprocess/example/doc_windows_shared_memory.cpp 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -17,6 +17,9 @@
 #include <cstring>
 #include <cstdlib>
 #include <string>
+//<-
+#include "../test/get_process_id_name.hpp"
+//->
 
 int main(int argc, char *argv[])
 {

Modified: trunk/libs/intrusive/doc/Jamfile.v2
==============================================================================
--- trunk/libs/intrusive/doc/Jamfile.v2 (original)
+++ trunk/libs/intrusive/doc/Jamfile.v2 2009-04-16 03:05:08 EDT (Thu, 16 Apr 2009)
@@ -55,5 +55,4 @@
         <xsl:param>generate.section.toc.level=3
         <xsl:param>chunk.first.sections=1
         <dependency>autodoc
- <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
    ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk