summaryrefslogtreecommitdiff
path: root/boost/interprocess/managed_shared_memory.hpp
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-08-26 12:15:55 (GMT)
committerAnas Nashif <anas.nashif@intel.com>2013-08-26 12:15:55 (GMT)
commitbb4dd8289b351fae6b55e303f189127a394a1edd (patch)
tree77c9c35a31b1459dd7988c2448e797d142530c41 /boost/interprocess/managed_shared_memory.hpp
parent1a78a62555be32868418fe52f8e330c9d0f95d5a (diff)
downloadboost-bb4dd8289b351fae6b55e303f189127a394a1edd.zip
boost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.gz
boost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.bz2
Imported Upstream version 1.51.0upstream/1.51.0refs/changes/75/8775/1
Diffstat (limited to 'boost/interprocess/managed_shared_memory.hpp')
-rw-r--r--boost/interprocess/managed_shared_memory.hpp50
1 files changed, 22 insertions, 28 deletions
diff --git a/boost/interprocess/managed_shared_memory.hpp b/boost/interprocess/managed_shared_memory.hpp
index cec9591..0f74c1a 100644
--- a/boost/interprocess/managed_shared_memory.hpp
+++ b/boost/interprocess/managed_shared_memory.hpp
@@ -25,23 +25,23 @@
#include <boost/interprocess/permissions.hpp>
//These includes needed to fulfill default template parameters of
//predeclarations in interprocess_fwd.hpp
-#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
+#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
#include <boost/interprocess/sync/mutex_family.hpp>
namespace boost {
namespace interprocess {
-//!A basic shared memory named object creation class. Initializes the
-//!shared memory segment. Inherits all basic functionality from
+//!A basic shared memory named object creation class. Initializes the
+//!shared memory segment. Inherits all basic functionality from
//!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>*/
template
<
- class CharType,
- class AllocationAlgorithm,
+ class CharType,
+ class AllocationAlgorithm,
template<class IndexConfig> class IndexType
>
-class basic_managed_shared_memory
+class basic_managed_shared_memory
: public ipcdetail::basic_managed_memory_impl
<CharType, AllocationAlgorithm, IndexType
,ipcdetail::managed_open_or_create_impl<shared_memory_object
@@ -50,7 +50,7 @@ class basic_managed_shared_memory
, AllocationAlgorithm::Alignment>
{
/// @cond
- typedef ipcdetail::basic_managed_memory_impl
+ typedef ipcdetail::basic_managed_memory_impl
<CharType, AllocationAlgorithm, IndexType,
ipcdetail::managed_open_or_create_impl
< shared_memory_object, AllocationAlgorithm::Alignment>::ManagedOpenOrCreateUserOffset> base_t;
@@ -87,12 +87,12 @@ class basic_managed_shared_memory
basic_managed_shared_memory()
{}
- //!Creates shared memory and creates and places the segment manager.
+ //!Creates shared memory and creates and places the segment manager.
//!This can throw.
basic_managed_shared_memory(create_only_t create_only, const char *name,
size_type size, const void *addr = 0, const permissions& perm = permissions())
: base_t()
- , base2_t(create_only, name, size, read_write, addr,
+ , base2_t(create_only, name, size, read_write, addr,
create_open_func_t(get_this_pointer(), ipcdetail::DoCreate), perm)
{}
@@ -101,43 +101,43 @@ class basic_managed_shared_memory
//!segment.
//!This can throw.
basic_managed_shared_memory (open_or_create_t open_or_create,
- const char *name, size_type size,
+ const char *name, size_type size,
const void *addr = 0, const permissions& perm = permissions())
: base_t()
- , base2_t(open_or_create, name, size, read_write, addr,
- create_open_func_t(get_this_pointer(),
+ , base2_t(open_or_create, name, size, read_write, addr,
+ create_open_func_t(get_this_pointer(),
ipcdetail::DoOpenOrCreate), perm)
{}
//!Connects to a created shared memory and its segment manager.
//!in copy_on_write mode.
//!This can throw.
- basic_managed_shared_memory (open_copy_on_write_t, const char* name,
+ basic_managed_shared_memory (open_copy_on_write_t, const char* name,
const void *addr = 0)
: base_t()
- , base2_t(open_only, name, copy_on_write, addr,
- create_open_func_t(get_this_pointer(),
+ , base2_t(open_only, name, copy_on_write, addr,
+ create_open_func_t(get_this_pointer(),
ipcdetail::DoOpen))
{}
//!Connects to a created shared memory and its segment manager.
//!in read-only mode.
//!This can throw.
- basic_managed_shared_memory (open_read_only_t, const char* name,
+ basic_managed_shared_memory (open_read_only_t, const char* name,
const void *addr = 0)
: base_t()
- , base2_t(open_only, name, read_only, addr,
- create_open_func_t(get_this_pointer(),
+ , base2_t(open_only, name, read_only, addr,
+ create_open_func_t(get_this_pointer(),
ipcdetail::DoOpen))
{}
//!Connects to a created shared memory and its segment manager.
//!This can throw.
- basic_managed_shared_memory (open_only_t open_only, const char* name,
+ basic_managed_shared_memory (open_only_t open_only, const char* name,
const void *addr = 0)
: base_t()
- , base2_t(open_only, name, read_write, addr,
- create_open_func_t(get_this_pointer(),
+ , base2_t(open_only, name, read_write, addr,
+ create_open_func_t(get_this_pointer(),
ipcdetail::DoOpen))
{}
@@ -168,7 +168,7 @@ class basic_managed_shared_memory
}
//!Tries to resize the managed shared memory object so that we have
- //!room for more objects.
+ //!room for more objects.
//!
//!This function is not synchronized so no other thread or process should
//!be reading or writing the file
@@ -187,12 +187,6 @@ class basic_managed_shared_memory
return base_t::template shrink_to_fit
<basic_managed_shared_memory>(shmname);
}
-
- bool flush()
- {
- return this->base2_t::flush();
- }
-
/// @cond
//!Tries to find a previous named allocation address. Returns a memory