...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Boost.Interprocess uses the Windows
COM library to implement some features and initializes it with concurrency
model COINIT_APARTMENTTHREADED
.
If the COM library was already initialized by the calling thread for
another concurrency model, Boost.Interprocess
handles this gracefully and uses COM calls for the already initialized
model. If for some reason, you want Boost.Interprocess
to initialize the COM library with another model, define the macro BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL
before including Boost.Interprocess
to one of these values:
COINIT_APARTMENTTHREADED_BIPC
COINIT_MULTITHREADED_BIPC
COINIT_DISABLE_OLE1DDE_BIPC
COINIT_SPEED_OVER_MEMORY_BIPC
Shared memory (shared_memory_object
)
is implemented in windows using memory mapped files, placed in a shared
directory in the shared documents folder (SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common AppData
).
This directory name is the last bootup time obtained via COM calls (if
BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
)
defined or searching the system log for a startup event (the default
implementation), so that each bootup shared memory is created in a new
folder obtaining kernel persistence shared memory.
If using BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
,
due to COM implementation related errors, in Boost 1.48 & Boost 1.49
the bootup-time folder was dumped and files were directly created in
shared documents folder, reverting to filesystem persistence shared memory.
Boost 1.50 fixed those issues and recovered bootup time directory and
kernel persistence. If you need to reproduce Boost 1.48 & Boost 1.49
behaviour to communicate with applications compiled with that version,
comment #define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
directive in the Windows configuration part of boost/interprocess/detail/workaround.hpp
.
If using the default implementation, (BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
undefined) and the Startup Event is not found, this might be due to some
buggy software that floods or erases the event log.
In any error case (shared documents folder is not defined or bootup time
could not be obtained, the library throws an error. You still can use
Boost.Interprocess definining your own
directory as the shared directory. Just define BOOST_INTERPROCESS_SHARED_DIR_PATH
when using the library and that path will be used to place shared memory
files.
If BOOST_USE_WINDOWS_H
is defined, <windows.h> and other windows SDK files are included,
otherwise the library declares needed functions and structures to reduce
the impact of including those heavy headers.
On systems without POSIX shared memory support shared memory objects
are implemented as memory mapped files, using a directory placed in
"/tmp" that can include (if BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
is defined) the last bootup time (if the Os supports it). As in Windows,
in any error case obtaining this directory the library throws an error
. You still can use Boost.Interprocess
definining your own directory as the shared directory. Just define
BOOST_INTERPROCESS_SHARED_DIR_PATH
when using the library and that path will be used to place shared memory
files.
The committed address space is the total amount of virtual memory (swap or physical memory/RAM) that the kernel might have to supply if all applications decide to access all of the memory they've requested from the kernel. By default, Linux allows processes to commit more virtual memory than available in the system. If that memory is not accessed, no physical memory + swap is actually used.
The reason for this behaviour is that Linux tries to optimize memory usage on forked processes; fork() creates a full copy of the process space, but with overcommitted memory, in this new forked instance only pages which have been written to actually need to be allocated by the kernel. If applications access more memory than available, then the kernel must free memory in the hard way: the OOM (Out Of Memory)-killer picks some processes to kill in order to recover memory.
Boost.Interprocess has no way to change this behaviour and users might suffer the OOM-killer when accessing shared memory. According to the Kernel documentation, the Linux kernel supports several overcommit modes. If you need non-kill guarantees in your application, you should change this overcommit behaviour.
Many people have contributed with ideas and revisions, so this is the place to thank them:
BOOST_INTERPROCESS_MSG_QUEUE_CIRCULAR_INDEX
option of message queue, was completely broken so an ABI break was
necessary to have a working implementation.
BOOST_INTERPROCESS_SHARED_DIR_PATH
option to define the shared directory used to place shared memory
objects when implemented as memory mapped files.
BOOST_USE_WINDOWS_H
.
When this macro is defined Interprocess does not declare used Windows
API function and types, includes all needed windows SDK headers and
uses types and functions declared by the Windows SDK.
get_size
to
::boost:interprocess:windows_shared_memory
.
LastBootupTime
from WMI was unstable with time synchronization and hibernation and
unusable in practice. If you really need to obtain pre Boost 1.54
behaviour define BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
from command line or detail/workaround.hpp
.
shrink_by
and
advise
functions
in mapped_region
.
message_queue
with a circular buffer
index (the old behavior used an ordered array, leading to excessive
copies). This should greatly increase performance but breaks ABI.
Old behaviour/ABI can be used undefining macro BOOST_INTERPROCESS_MSG_QUEUE_CIRCULAR_INDEX
in boost/interprocess/detail/workaround.hpp
message_queue
insertion time avoiding priority search for common cases (both array
and circular buffer configurations).
interproces_sharable_mutex
and interproces_condition_any
.
offset_ptr
performance.
mapped_region::flush
.
get_offset
method
from mapped_region
as it has no practical utility and m_offset
member was not for anything else.
flush
from managed_shared_memory
. as it is
unspecified according to POSIX: "The
effect of msync() on a shared memory object or a typed memory object
is unspecified" .
#define
BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
in the windows configuration part to get Boost 1.48 & Boost 1.49
behaviour.
mapped_region::flush
initiates disk flushing but
does not guarantee it's completed when returns, since it is not portable.
semaphore
and named_semaphore
now implemented more efficiently with atomic operations.
stable_vector
container.
shared_memory_object::remove
has now POSIX unlink
semantics and file_mapping::remove
was added to obtain POSIX unlink
semantics with mapped files.
BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION
macro option to force the use of generic emulation code for process-shared
synchronization primitives instead of native POSIX functions.
boost::posix_time::pos_inf
value is now handled portably
for timed functions.
iterator
to const_iterator
in containers to keep up with the draft of the next standard.
void
return types from flat_map::erase()
functions.
mapped_region
the mode used to
create it.
shared_ptr
is movable
and supports aliasing.
shared_ptr
,
weak_ptr
and unique_ptr
.
Added explanations and examples of these smart pointers in the documentation.
pointer
as an smart pointer. This increases performance and improves
compilation times.
named_mutex
and named_semaphore
with POSIX named semaphores in systems supporting that option. named_condition
has been accordingly changed to support interoperability with named_mutex
.
mapped_region
in UNIX when mapping address was provided but the region was mapped
in another address.
aligned_allocate
and allocate_many
functions to managed memory segments.
get_instance_name
,
get_instance_length
and get_instance_type
functions to managed memory segments.
rbtree_best_fit
.
vector
.
segment_manager
to avoid code bloat associated with templated instantiations.
deque::clear()
and deque::erase()
, they were declared private.
deque::erase()
. Thanks to Steve LoBasso.
atomic_dec32()
. Thanks to Glenn Schrader.
offset_ptr
pointers.
managed_mapped_file
.
boost::has_trivial_destructor
.
This optimization avoids calling destructors of elements that have
a trivial destructor.
has_trivial_destructor_after_move
trait. This optimization avoids calling destructors of elements that
have a trivial destructor if the element has been moved (which is
the case of many movable types). This trick was provided by Howard
Hinnant.
deallocate_free_chunks()
) to manually deallocate completely
free chunks from node allocators.
multiset
and multimap
classes.
shared_memory_object.hpp
header instead of shared
memory.hpp
.
mode_t
type.
mapped_region
constructor no longer requires classes derived from memory_mappable,
but classes must fulfill the MemoryMappable concept.
Some useful references about the C++ programming language, C++ internals, shared memory, allocators and containers used to design Boost.Interprocess.
There are some Interprocess features that I would like to implement and some Boost.Interprocess code that can be much better. Let's see some ideas:
Win32 version of shared mutexes and shared conditions are based on "spin and wait" atomic instructions. This leads to poor performance and does not manage any issues like priority inversions. We would need very serious help from threading experts on this. And I'm not sure that this can be achieved in user-level software. Posix based implementations use PTHREAD_PROCESS_SHARED attribute to place mutexes in shared memory, so there are no such problems. I'm not aware of any implementation that simulates PTHREAD_PROCESS_SHARED attribute for Win32. We should be able to construct these primitives in memory mapped files, so that we can get filesystem persistence just like with POSIX primitives.
Currently Interprocess only allows char based names for basic named objects. However, several operating systems use wchar_t names for resources (mapped files, for example). In the future Interprocess should try to present a portable narrow/wide char interface. To do this, it would be useful to have a boost wstring <-> string conversion utilities to translate resource names (escaping needed characters that can conflict with OS names) in a portable way. It would be interesting also the use of boost::filesystem paths to avoid operating system specific issues.
Boost.Interprocess does not define security attributes for shared memory and synchronization objects. Standard C++ also ignores security attributes with files so adding security attributes would require some serious work.
Boost.Interprocess offers a process-shared message queue based on Boost.Interprocess primitives like mutexes and conditions. I would want to develop more mechanisms, like stream-oriented named fifo so that we can use it with a iostream-interface wrapper (we can imitate Unix pipes).
C++ needs more complex mechanisms and it would be nice to have a stream and datagram oriented PF_UNIX-like mechanism in C++. And for very fast inter-process remote calls Solaris doors is an interesting alternative to implement for C++. But the work to implement PF_UNIX-like sockets and doors would be huge (and it might be difficult in a user-level library). Any network expert volunteer?
A B C D E F I L M N O P R S T U W X
accept_ownership_type
adaptive_pool_base
adaptive_pool_v1
allocator
allocator_holder
bad_alloc
basic_bufferbuf
basic_bufferstream
basic_ibufferstream
basic_ivectorstream
basic_managed_external_buffer
basic_managed_heap_memory
basic_managed_mapped_file
basic_managed_shared_memory
basic_managed_windows_shared_memory
basic_managed_xsi_shared_memory
basic_obufferstream
basic_ovectorstream
basic_vectorbuf
basic_vectorstream
create_only_t
defer_lock_type
deleter
enable_shared_from_this
file_lock
file_mapping
flat_map_index_aux
interprocess_condition
interprocess_condition_any
interprocess_exception
interprocess_mutex
interprocess_recursive_mutex
interprocess_semaphore
interprocess_sharable_mutex
interprocess_upgradable_mutex
intrusive_ptr
iset_index_aux
iunordered_set_index_aux
lock_exception
managed_shared_ptr
managed_unique_ptr
managed_weak_ptr
mapped_region
message_queue_t
mutex_family
named_condition
named_condition_any
named_mutex
named_recursive_mutex
named_semaphore
named_sharable_mutex
named_upgradable_mutex
node_allocator_base
node_allocator_v1
null_index
null_mutex
null_mutex_family
offset_ptr
open_copy_on_write_t
open_only_t
open_or_create_t
open_read_only_t
open_read_private_t
permissions
private_adaptive_pool_base
private_adaptive_pool_v1
private_node_allocator_base
private_node_allocator_v1
rbtree_best_fit
rebind
remove_file_on_destroy
remove_shared_memory_on_destroy
scoped_lock
scoped_ptr
segment_manager
segment_manager_base
sharable_lock
shared_memory_object
shared_ptr
simple_seq_fit
try_to_lock_type
unique_ptr
unordered_map_index_aux
upgradable_lock
weak_ptr
windows_shared_memory
xsi_key
xsi_shared_memory
A B C D E F I K M N O P R S T V W
allocator_type
base_t
base_type
bufferbuf
bufferstream
char_type
const_named_iterator
const_pointer
const_reference
const_unique_iterator
deleter
deleter_type
difference_type
element_type
fixed_managed_shared_memory
managed_external_buffer
managed_heap_memory
managed_mapped_file
managed_shared_memory
managed_windows_shared_memory
managed_xsi_shared_memory
mapped_type
memory_algorithm
message_queue
multiallocation_chain
mutex_family
mutex_type
native_error_t
obufferstream
off_type
other
pointer
pos_type
recursive_mutex_type
reference
segment_manager
segment_manager_base
segment_manager_base_type
size_type
traits_type
type
value_type
vector_type
version
void_allocator
void_pointer
wbufferbuf
wbufferstream
wfixed_managed_shared_memory
wibufferstream
wmanaged_external_buffer
wmanaged_heap_memory
wmanaged_mapped_file
wmanaged_shared_memory
wmanaged_windows_shared_memory
wmanaged_xsi_shared_memory
wobufferstream
A B C D E F G I L M N O P R S T U W Z
adaptive_pool
advise
allocate
allocate_aligned
allocate_individual
allocate_many
allocate_one
all_memory_deallocated
atomic_func
bad_alloc
basic_managed_external_buffer
basic_managed_heap_memory
basic_managed_shared_memory
basic_managed_windows_shared_memory
basic_managed_xsi_shared_memory
begin
buffer
cached_adaptive_pool
cached_node_allocator
check_sanity
clear
construct
construct_it
data
deallocate
deallocate_free_blocks
deallocate_individual
deallocate_many
deallocate_one
destroy
destroy_ptr
file_mapping
find
find_or_construct
find_or_construct_it
flush
for
get
get_allocator
get_deleter
get_instance_length
get_instance_name
get_instance_type
get_min_size
get_num_named_objects
get_num_unique_objects
get_page_size
grow
if
insert_commit
interprocess_condition
interprocess_condition_any
interprocess_exception
interprocess_mutex
interprocess_recursive_mutex
interprocess_semaphore
interprocess_sharable_mutex
interprocess_upgradable_mutex
intrusive_ptr_add_ref
intrusive_ptr_release
lock
lock_exception
lock_sharable
lock_upgradable
make_managed_shared_ptr
make_managed_unique_ptr
make_managed_weak_ptr
mapped_region
name
named_condition
named_condition_any
named_mutex
named_recursive_mutex
named_semaphore
named_sharable_mutex
named_upgradable_mutex
node_allocator
notify_all
notify_one
null_index
null_mutex
offset_ptr
pointer_to
post
pred
private_adaptive_pool
private_node_allocator
rbtree_best_fit
receive
release
remove
reserve
reserve_named_objects
reserve_unique_objects
reset
scoped_ptr
segment_manager
send
set_default
set_max_cached_nodes
set_permissions
set_unrestricted
sharable_lock
shrink_by
shrink_to_fit
shrink_to_fit_indexes
swap
swap_vector
timed_lock
timed_lock_sharable
timed_lock_upgradable
timed_receive
timed_send
timed_unlock_upgradable_and_lock
timed_wait
to_raw_pointer
truncate
try_atomic_func
try_lock
try_lock_sharable
try_lock_upgradable
try_receive
try_send
try_unlock_sharable_and_lock
try_unlock_sharable_and_lock_upgradable
try_unlock_upgradable_and_lock
try_wait
unique_ptr
unlock
unlock_and_lock_sharable
unlock_and_lock_upgradable
unlock_sharable
unlock_upgradable
unlock_upgradable_and_lock
unlock_upgradable_and_lock_sharable
upgradable_lock
wait
while
zero_free_memory
Describes adaptive_pool pooled shared memory STL compatible allocator
template<typename T, typename SegmentManager, std::size_t NodesPerBlock, std::size_t MaxFreeBlocks, unsigned char OverheadPercent> class adaptive_pool;namespace boost { template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2, unsigned char OverheadPercent = 5> class adaptive_pool_v1; template<unsigned int V, typename T, typename S, std::size_t NPC, std::size_t F, unsigned char OP> bool operator==(const adaptive_pool_base< V, T, S, NPC, F, OP > &, const adaptive_pool_base< V, T, S, NPC, F, OP > &); template<unsigned int V, typename T, typename S, std::size_t NPC, std::size_t F, unsigned char OP> bool operator!=(const adaptive_pool_base< V, T, S, NPC, F, OP > &, const adaptive_pool_base< V, T, S, NPC, F, OP > &); namespace interprocess { adaptive_pool_base(segment_manager *); adaptive_pool_base(const adaptive_pool_base &); // Assignment from other adaptive_pool_base. adaptive_pool_base & operator=(const adaptive_pool_base & other); template<typename T2> adaptive_pool_base(const adaptive_pool_base< Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > &); ~adaptive_pool_base(); } } template<typename T, typename S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> bool operator==(const adaptive_pool< T, S, NodesPerBlock, F, OP > &, const adaptive_pool< T, S, NodesPerBlock, F, OP > &); template<typename T, typename S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> bool operator!=(const adaptive_pool< T, S, NodesPerBlock, F, OP > &, const adaptive_pool< T, S, NodesPerBlock, F, OP > &);
Describes an allocator that allocates portions of fixed size memory buffer (shared memory, mapped file...)
namespace boost { namespace interprocess { template<typename T, typename SegmentManager> bool operator==(const allocator< T, SegmentManager > &, const allocator< T, SegmentManager > &); template<typename T, typename SegmentManager> bool operator!=(const allocator< T, SegmentManager > &, const allocator< T, SegmentManager > &); } }
Describes cached_adaptive_pool pooled shared memory STL compatible allocator
namespace boost { namespace interprocess { template<typename T, typename S, std::size_t NodesPerBlock, std::size_t F, std::size_t OP> bool operator==(const cached_adaptive_pool< T, S, NodesPerBlock, F, OP > &, const cached_adaptive_pool< T, S, NodesPerBlock, F, OP > &); template<typename T, typename S, std::size_t NodesPerBlock, std::size_t F, std::size_t OP> bool operator!=(const cached_adaptive_pool< T, S, NodesPerBlock, F, OP > &, const cached_adaptive_pool< T, S, NodesPerBlock, F, OP > &); } }
Describes cached_cached_node_allocator pooled shared memory STL compatible allocator
namespace boost { namespace interprocess { template<typename T, typename S, std::size_t NPC> bool operator==(const cached_node_allocator< T, S, NPC > &, const cached_node_allocator< T, S, NPC > &); template<typename T, typename S, std::size_t NPC> bool operator!=(const cached_node_allocator< T, S, NPC > &, const cached_node_allocator< T, S, NPC > &); } }
Describes node_allocator pooled shared memory STL compatible allocator
template<typename T, typename SegmentManager, std::size_t NodesPerBlock> class node_allocator;namespace boost { template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64> class node_allocator_v1; template<unsigned int V, typename T, typename S, std::size_t NPC> bool operator==(const node_allocator_base< V, T, S, NPC > &, const node_allocator_base< V, T, S, NPC > &); template<unsigned int V, typename T, typename S, std::size_t NPC> bool operator!=(const node_allocator_base< V, T, S, NPC > &, const node_allocator_base< V, T, S, NPC > &); namespace interprocess { BOOST_STATIC_ASSERT((Version<=2)); node_allocator_base(segment_manager *); node_allocator_base(const node_allocator_base &); template<typename T2> node_allocator_base(const node_allocator_base< Version, T2, SegmentManager, NodesPerBlock > &); // Assignment from other node_allocator_base. node_allocator_base & operator=(const node_allocator_base & other); ~node_allocator_base(); } } template<typename T, typename S, std::size_t NPC> bool operator==(const node_allocator< T, S, NPC > &, const node_allocator< T, S, NPC > &); template<typename T, typename S, std::size_t NPC> bool operator!=(const node_allocator< T, S, NPC > &, const node_allocator< T, S, NPC > &);
Describes private_adaptive_pool_base pooled shared memory STL compatible allocator
template<typename T, typename SegmentManager, std::size_t NodesPerBlock, std::size_t MaxFreeBlocks, unsigned char OverheadPercent> class private_adaptive_pool;namespace boost { template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2, unsigned char OverheadPercent = 5> class private_adaptive_pool_v1; // Equality test for same type of private_adaptive_pool_base. template<unsigned int V, typename T, typename S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> bool operator==(const private_adaptive_pool_base< V, T, S, NodesPerBlock, F, OP > & alloc1, const private_adaptive_pool_base< V, T, S, NodesPerBlock, F, OP > & alloc2); // Inequality test for same type of private_adaptive_pool_base. template<unsigned int V, typename T, typename S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> bool operator!=(const private_adaptive_pool_base< V, T, S, NodesPerBlock, F, OP > & alloc1, const private_adaptive_pool_base< V, T, S, NodesPerBlock, F, OP > & alloc2); namespace interprocess { // Constructor from a segment manager. private_adaptive_pool_base(segment_manager * segment_mngr); // Copy constructor from other private_adaptive_pool_base. Never throws. private_adaptive_pool_base(const private_adaptive_pool_base & other); // Copy constructor from related private_adaptive_pool_base. Never throws. template<typename T2> private_adaptive_pool_base(const private_adaptive_pool_base< Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > & other); // Destructor, frees all used memory. Never throws. ~private_adaptive_pool_base(); } } template<typename T, typename S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> bool operator==(const private_adaptive_pool< T, S, NodesPerBlock, F, OP > &, const private_adaptive_pool< T, S, NodesPerBlock, F, OP > &); template<typename T, typename S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> bool operator!=(const private_adaptive_pool< T, S, NodesPerBlock, F, OP > &, const private_adaptive_pool< T, S, NodesPerBlock, F, OP > &);
Describes private_node_allocator_base pooled shared memory STL compatible allocator
template<typename T, typename SegmentManager, std::size_t NodesPerBlock> class private_node_allocator;namespace boost { template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64> class private_node_allocator_v1; // Equality test for same type of private_node_allocator_base. template<unsigned int V, typename T, typename S, std::size_t NPC> bool operator==(const private_node_allocator_base< V, T, S, NPC > & alloc1, const private_node_allocator_base< V, T, S, NPC > & alloc2); // Inequality test for same type of private_node_allocator_base. template<unsigned int V, typename T, typename S, std::size_t NPC> bool operator!=(const private_node_allocator_base< V, T, S, NPC > & alloc1, const private_node_allocator_base< V, T, S, NPC > & alloc2); namespace interprocess { template<typename T2> struct rebind; typedef boost::intrusive::pointer_traits< void_pointer >::template rebind_pointer< T >::type pointer; typedef boost::intrusive::pointer_traits< void_pointer >::template rebind_pointer< const T >::type const_pointer; typedef T value_type; typedef unspecified reference; typedef unspecified const_reference; typedef segment_manager::size_type size_type; typedef segment_manager::difference_type difference_type; typedef boost::interprocess::version_type< private_node_allocator_base, Version > version; typedef unspecified multiallocation_chain; // Constructor from a segment manager. private_node_allocator_base(segment_manager * segment_mngr); // Copy constructor from other private_node_allocator_base. Never throws. private_node_allocator_base(const private_node_allocator_base & other); // Copy constructor from related private_node_allocator_base. Never throws. template<typename T2> private_node_allocator_base(const private_node_allocator_base< Version, T2, SegmentManager, NodesPerBlock > & other); // Destructor, frees all used memory. Never throws. ~private_node_allocator_base(); segment_manager * get_segment_manager(); node_pool_t * get_node_pool(); friend void swap(self_t &, self_t &); } } template<typename T, typename S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> bool operator==(const private_node_allocator< T, S, NodesPerBlock, F, OP > &, const private_node_allocator< T, S, NodesPerBlock, F, OP > &); template<typename T, typename S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> bool operator!=(const private_node_allocator< T, S, NodesPerBlock, F, OP > &, const private_node_allocator< T, S, NodesPerBlock, F, OP > &);
Describes a function that creates anonymous shared memory that can be shared between forked processes
namespace boost { namespace interprocess { mapped_region anonymous_shared_memory(std::size_t, void * = 0); } }
namespace boost { namespace interprocess { struct create_only_t; struct open_only_t; struct open_read_only_t; struct open_read_private_t; struct open_copy_on_write_t; struct open_or_create_t; static const create_only_t create_only; static const open_only_t open_only; static const open_read_only_t open_read_only; static const open_or_create_t open_or_create; static const open_copy_on_write_t open_copy_on_write; } }
Describes the error numbering of interprocess classes
namespace boost { namespace interprocess { enum error_code_t { no_error = = 0, system_error, other_error, security_error, read_only_error, io_error, path_error, not_found_error, busy_error, already_exists_error, not_empty_error, is_directory_error, out_of_space_error, out_of_memory_error, out_of_resource_error, lock_error, sem_error, mode_error, size_error, corrupted_error, not_such_file_or_directory, invalid_argument, timeout_when_locking_error, timeout_when_waiting_error, owner_dead_error }; typedef int native_error_t; } }
Describes exceptions thrown by interprocess classes
namespace boost { namespace interprocess { class interprocess_exception; class lock_exception; class bad_alloc; } }
Describes file_mapping and mapped region classes
namespace boost { namespace interprocess { class file_mapping; class remove_file_on_destroy; } }
Describes index adaptor of boost::map container, to use it as name/shared memory index
namespace boost { namespace interprocess { template<typename MapConfig> struct flat_map_index_aux; } }
Describes index adaptor of boost::intrusive::set container, to use it as name/shared memory index
Describes index adaptor of boost::intrusive::unordered_set container, to use it as name/shared memory index
Describes index adaptor of boost::map container, to use it as name/shared memory index
Describes a null index adaptor, so that if we don't want to construct named objects, we can use this null index type to save resources.
Describes index adaptor of boost::unordered_map container, to use it as name/shared memory index
namespace boost { namespace interprocess { template<typename Mutex> class scoped_lock; template<typename SharableMutex> class sharable_lock; template<typename UpgradableMutex> class upgradable_lock; template<typename T, typename SegmentManager> class allocator; template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64> class node_allocator; template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64> class private_node_allocator; template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64> class cached_node_allocator; template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2, unsigned char OverheadPercent = 5> class adaptive_pool; template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2, unsigned char OverheadPercent = 5> class private_adaptive_pool; template<typename T, typename SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2, unsigned char OverheadPercent = 5> class cached_adaptive_pool; template<typename T, typename DifferenceType = std::ptrdiff_t, typename OffsetType = std::size_t, std::size_t Alignment = offset_type_alignment> class offset_ptr; template<typename MutexFamily, typename VoidMutex = offset_ptr<void> > class simple_seq_fit; template<typename MutexFamily, typename VoidMutex = offset_ptr<void>, std::size_t MemAlignment = 0> class rbtree_best_fit; template<typename IndexConfig> class flat_map_index; template<typename IndexConfig> class iset_index; template<typename IndexConfig> class iunordered_set_index; template<typename IndexConfig> class map_index; template<typename IndexConfig> class null_index; template<typename IndexConfig> class unordered_map_index; template<typename CharType, typename MemoryAlgorithm, template< class IndexConfig > class IndexType> class basic_managed_external_buffer; template<typename CharType, typename MemoryAlgorithm, template< class IndexConfig > class IndexType> class basic_managed_shared_memory; template<typename CharType, typename MemoryAlgorithm, template< class IndexConfig > class IndexType> class basic_managed_xsi_shared_memory; template<typename CharType, typename MemoryAlgorithm, template< class IndexConfig > class IndexType> class basic_managed_heap_memory; template<typename CharType, typename MemoryAlgorithm, template< class IndexConfig > class IndexType> class basic_managed_mapped_file; template<typename CharT, typename CharTraits = std::char_traits<CharT> > class basic_bufferbuf; template<typename CharT, typename CharTraits = std::char_traits<CharT> > class basic_ibufferstream; template<typename CharT, typename CharTraits = std::char_traits<CharT> > class basic_obufferstream; template<typename CharT, typename CharTraits = std::char_traits<CharT> > class basic_bufferstream; template<typename CharVector, typename CharTraits = std::char_traits<typename CharVector::value_type> > class basic_vectorbuf; template<typename CharVector, typename CharTraits = std::char_traits<typename CharVector::value_type> > class basic_ivectorstream; template<typename CharVector, typename CharTraits = std::char_traits<typename CharVector::value_type> > class basic_ovectorstream; template<typename CharVector, typename CharTraits = std::char_traits<typename CharVector::value_type> > class basic_vectorstream; template<typename T, typename Deleter> class scoped_ptr; template<typename T, typename VoidPointer> class intrusive_ptr; template<typename T, typename VoidAllocator, typename Deleter> class shared_ptr; template<typename T, typename VoidAllocator, typename Deleter> class weak_ptr; template<typename VoidPointer> class message_queue_t; typedef basic_managed_external_buffer< char,rbtree_best_fit< null_mutex_family >,iset_index > managed_external_buffer; typedef basic_managed_external_buffer< wchar_t,rbtree_best_fit< null_mutex_family >,iset_index > wmanaged_external_buffer; typedef basic_managed_shared_memory< char,rbtree_best_fit< mutex_family >,iset_index > managed_shared_memory; typedef basic_managed_shared_memory< wchar_t,rbtree_best_fit< mutex_family >,iset_index > wmanaged_shared_memory; typedef basic_managed_windows_shared_memory< char,rbtree_best_fit< mutex_family >,iset_index > managed_windows_shared_memory; typedef basic_managed_windows_shared_memory< wchar_t,rbtree_best_fit< mutex_family >,iset_index > wmanaged_windows_shared_memory; typedef basic_managed_xsi_shared_memory< char,rbtree_best_fit< mutex_family >,iset_index > managed_xsi_shared_memory; typedef basic_managed_xsi_shared_memory< wchar_t,rbtree_best_fit< mutex_family >,iset_index > wmanaged_xsi_shared_memory; typedef basic_managed_shared_memory< char,rbtree_best_fit< mutex_family, void * >,iset_index > fixed_managed_shared_memory; typedef basic_managed_shared_memory< wchar_t,rbtree_best_fit< mutex_family, void * >,iset_index > wfixed_managed_shared_memory; typedef basic_managed_heap_memory< char,rbtree_best_fit< null_mutex_family >,iset_index > managed_heap_memory; typedef basic_managed_heap_memory< wchar_t,rbtree_best_fit< null_mutex_family >,iset_index > wmanaged_heap_memory; typedef basic_managed_mapped_file< char,rbtree_best_fit< mutex_family >,iset_index > managed_mapped_file; typedef basic_managed_mapped_file< wchar_t,rbtree_best_fit< mutex_family >,iset_index > wmanaged_mapped_file; typedef message_queue_t< offset_ptr< void > > message_queue; static const std::size_t offset_type_alignment; } }
Describes an inter-process message queue. This class allows sending messages between processes and allows blocking, non-blocking and timed sending and receiving.
Describes a named user memory allocation user class.
Describes a named heap memory allocation user class.
namespace boost { namespace interprocess { template<typename CharType, typename AllocationAlgorithm, template< class IndexConfig > class IndexType> class basic_managed_windows_shared_memory; } }
Describes mapped region class
namespace boost { namespace interprocess { class mapped_region; } }
Describes a best-fit algorithm based in an intrusive red-black tree used to allocate objects in shared memory. This class is intended as a base class for single segment and multi-segment implementations.
Describes sequential fit algorithm used to allocate objects in shared memory.
Describes a smart pointer that stores the offset between this pointer and target pointee, called offset_ptr.
namespace boost { template<typename T> struct has_trivial_constructor; template<typename T> struct has_trivial_destructor; namespace interprocess { template<typename E, typename T, typename W, typename X, typename Y, std::size_t Z> std::basic_ostream< E, T > & operator<<(std::basic_ostream< E, T > &, offset_ptr< W, X, Y, Z > const &); template<typename E, typename T, typename W, typename X, typename Y, std::size_t Z> std::basic_istream< E, T > & operator>>(std::basic_istream< E, T > &, offset_ptr< W, X, Y, Z > &); // Simulation of static_cast between pointers. Never throws. template<typename T1, typename P1, typename O1, std::size_t A1, typename T2, typename P2, typename O2, std::size_t A2> boost::interprocess::offset_ptr< T1, P1, O1, A1 > static_pointer_cast(const boost::interprocess::offset_ptr< T2, P2, O2, A2 > & r); // Simulation of const_cast between pointers. Never throws. template<typename T1, typename P1, typename O1, std::size_t A1, typename T2, typename P2, typename O2, std::size_t A2> boost::interprocess::offset_ptr< T1, P1, O1, A1 > const_pointer_cast(const boost::interprocess::offset_ptr< T2, P2, O2, A2 > & r); // Simulation of dynamic_cast between pointers. Never throws. template<typename T1, typename P1, typename O1, std::size_t A1, typename T2, typename P2, typename O2, std::size_t A2> boost::interprocess::offset_ptr< T1, P1, O1, A1 > dynamic_pointer_cast(const boost::interprocess::offset_ptr< T2, P2, O2, A2 > & r); // Simulation of reinterpret_cast between pointers. Never throws. template<typename T1, typename P1, typename O1, std::size_t A1, typename T2, typename P2, typename O2, std::size_t A2> boost::interprocess::offset_ptr< T1, P1, O1, A1 > reinterpret_pointer_cast(const boost::interprocess::offset_ptr< T2, P2, O2, A2 > & r); } }
Describes permissions class
namespace boost { namespace interprocess { class permissions; } }
Describes the object placed in a memory segment that provides named object allocation capabilities for single-segment and multi-segment allocations.
namespace boost { namespace interprocess { template<typename MemoryAlgorithm> class segment_manager_base; template<typename CharType, typename MemoryAlgorithm, template< class IndexConfig > class IndexType> class segment_manager; } }
Describes a shared memory object management class.
namespace boost { namespace interprocess { class shared_memory_object; class remove_shared_memory_on_destroy; } }
Describes the functor to delete objects from the segment.
namespace boost { namespace interprocess { template<typename T, typename SegmentManager> class deleter; } }
Describes an utility to form a shared pointer from this
namespace boost { namespace interprocess { template<typename T, typename A, typename D> class enable_shared_from_this; } }
Describes an intrusive ownership pointer.
namespace boost { namespace interprocess { template<typename T, typename U, typename VP> bool operator==(intrusive_ptr< T, VP > const &, intrusive_ptr< U, VP > const &); template<typename T, typename U, typename VP> bool operator!=(intrusive_ptr< T, VP > const &, intrusive_ptr< U, VP > const &); template<typename T, typename VP> bool operator==(intrusive_ptr< T, VP > const &, const typename intrusive_ptr< T, VP >::pointer &); template<typename T, typename VP> bool operator!=(intrusive_ptr< T, VP > const &, const typename intrusive_ptr< T, VP >::pointer &); template<typename T, typename VP> bool operator==(const typename intrusive_ptr< T, VP >::pointer &, intrusive_ptr< T, VP > const &); template<typename T, typename VP> bool operator!=(const typename intrusive_ptr< T, VP >::pointer &, intrusive_ptr< T, VP > const &); template<typename T, typename VP> bool operator<(intrusive_ptr< T, VP > const &, intrusive_ptr< T, VP > const &); template<typename T, typename VP> void swap(intrusive_ptr< T, VP > &, intrusive_ptr< T, VP > &); template<typename E, typename T, typename Y, typename VP> std::basic_ostream< E, T > & operator<<(std::basic_ostream< E, T > & os, intrusive_ptr< Y, VP > const & p); template<typename T, typename VP> boost::interprocess::intrusive_ptr< T, VP >::pointer to_raw_pointer(intrusive_ptr< T, VP >); } }
Describes the smart pointer scoped_ptr
namespace boost { namespace interprocess { template<typename T, typename D> void swap(scoped_ptr< T, D > &, scoped_ptr< T, D > &); template<typename T, typename D> scoped_ptr< T, D >::pointer to_raw_pointer(scoped_ptr< T, D > const &); } }
Describes the smart pointer shared_ptr
namespace boost { namespace interprocess { template<typename T, typename ManagedMemory> struct managed_shared_ptr; template<typename T, typename VoidAllocator, typename Deleter, typename U, typename VoidAllocator2, typename Deleter2> bool operator==(shared_ptr< T, VoidAllocator, Deleter > const & a, shared_ptr< U, VoidAllocator2, Deleter2 > const & b); template<typename T, typename VoidAllocator, typename Deleter, typename U, typename VoidAllocator2, typename Deleter2> bool operator!=(shared_ptr< T, VoidAllocator, Deleter > const & a, shared_ptr< U, VoidAllocator2, Deleter2 > const & b); template<typename T, typename VoidAllocator, typename Deleter, typename U, typename VoidAllocator2, typename Deleter2> bool operator<(shared_ptr< T, VoidAllocator, Deleter > const & a, shared_ptr< U, VoidAllocator2, Deleter2 > const & b); template<typename T, typename VoidAllocator, typename Deleter> void swap(shared_ptr< T, VoidAllocator, Deleter > & a, shared_ptr< T, VoidAllocator, Deleter > & b); template<typename T, typename VoidAllocator, typename Deleter, typename U> shared_ptr< T, VoidAllocator, Deleter > static_pointer_cast(shared_ptr< U, VoidAllocator, Deleter > const & r); template<typename T, typename VoidAllocator, typename Deleter, typename U> shared_ptr< T, VoidAllocator, Deleter > const_pointer_cast(shared_ptr< U, VoidAllocator, Deleter > const & r); template<typename T, typename VoidAllocator, typename Deleter, typename U> shared_ptr< T, VoidAllocator, Deleter > dynamic_pointer_cast(shared_ptr< U, VoidAllocator, Deleter > const & r); template<typename T, typename VoidAllocator, typename Deleter> T * to_raw_pointer(shared_ptr< T, VoidAllocator, Deleter > const & p); template<typename E, typename T, typename Y, typename VoidAllocator, typename Deleter> std::basic_ostream< E, T > & operator<<(std::basic_ostream< E, T > & os, shared_ptr< Y, VoidAllocator, Deleter > const & p); template<typename T, typename ManagedMemory> managed_shared_ptr< T, ManagedMemory >::type make_managed_shared_ptr(T *, ManagedMemory &); template<typename T, typename ManagedMemory> managed_shared_ptr< T, ManagedMemory >::type make_managed_shared_ptr(T *, ManagedMemory &, std::nothrow_t); } }
Describes the smart pointer unique_ptr
namespace boost { namespace interprocess { template<typename T, typename D> class unique_ptr; template<typename T, typename ManagedMemory> struct managed_unique_ptr; template<typename T, typename D> void swap(unique_ptr< T, D > & x, unique_ptr< T, D > & y); template<typename T1, typename D1, typename T2, typename D2> bool operator==(const unique_ptr< T1, D1 > & x, const unique_ptr< T2, D2 > & y); template<typename T1, typename D1, typename T2, typename D2> bool operator!=(const unique_ptr< T1, D1 > & x, const unique_ptr< T2, D2 > & y); template<typename T1, typename D1, typename T2, typename D2> bool operator<(const unique_ptr< T1, D1 > & x, const unique_ptr< T2, D2 > & y); template<typename T1, typename D1, typename T2, typename D2> bool operator<=(const unique_ptr< T1, D1 > & x, const unique_ptr< T2, D2 > & y); template<typename T1, typename D1, typename T2, typename D2> bool operator>(const unique_ptr< T1, D1 > & x, const unique_ptr< T2, D2 > & y); template<typename T1, typename D1, typename T2, typename D2> bool operator>=(const unique_ptr< T1, D1 > & x, const unique_ptr< T2, D2 > & y); template<typename T, typename ManagedMemory> managed_unique_ptr< T, ManagedMemory >::type make_managed_unique_ptr(T *, ManagedMemory &); } }
Describes the smart pointer weak_ptr.
namespace boost { namespace interprocess { template<typename T, typename ManagedMemory> struct managed_weak_ptr; template<typename T, typename A, typename D, typename U, typename A2, typename D2> bool operator<(weak_ptr< T, A, D > const & a, weak_ptr< U, A2, D2 > const & b); template<typename T, typename A, typename D> void swap(weak_ptr< T, A, D > & a, weak_ptr< T, A, D > & b); template<typename T, typename ManagedMemory> managed_weak_ptr< T, ManagedMemory >::type make_managed_weak_ptr(T *, ManagedMemory &); } }
This file defines basic_bufferbuf, basic_ibufferstream, basic_obufferstream, and basic_bufferstream classes. These classes represent streamsbufs and streams whose sources or destinations are fixed size character buffers.
namespace boost { namespace interprocess { typedef basic_bufferbuf< char > bufferbuf; typedef basic_bufferstream< char > bufferstream; typedef basic_ibufferstream< char > ibufferstream; typedef basic_obufferstream< char > obufferstream; typedef basic_bufferbuf< wchar_t > wbufferbuf; typedef basic_bufferstream< wchar_t > wbufferstream; typedef basic_ibufferstream< wchar_t > wibufferstream; typedef basic_obufferstream< wchar_t > wobufferstream; } }
This file defines basic_vectorbuf, basic_ivectorstream, basic_ovectorstream, and basic_vectorstreamclasses. These classes represent streamsbufs and streams whose sources or destinations are STL-like vectors that can be swapped with external vectors to avoid unnecessary allocations/copies.
Describes a class that wraps file locking capabilities.
namespace boost { namespace interprocess { class file_lock; } }
Describes process-shared variables interprocess_condition class
namespace boost { namespace interprocess { class interprocess_condition; } namespace posix_time { } }
Describes process-shared variables interprocess_condition_any class
namespace boost { namespace interprocess { class interprocess_condition_any; } namespace posix_time { } }
Describes a mutex class that can be placed in memory shared by several processes.
namespace boost { namespace interprocess { class interprocess_mutex; } }
Describes interprocess_recursive_mutex and shared_recursive_try_mutex classes
namespace boost { namespace interprocess { class interprocess_recursive_mutex; } }
Describes a interprocess_semaphore class for inter-process synchronization
namespace boost { namespace interprocess { class interprocess_semaphore; } }
Describes interprocess_sharable_mutex class
namespace boost { namespace interprocess { class interprocess_sharable_mutex; } }
Describes interprocess_upgradable_mutex class
namespace boost { namespace interprocess { class interprocess_upgradable_mutex; } }
Describes the lock options with associated with interprocess_mutex lock constructors.
namespace boost { namespace interprocess { struct defer_lock_type; struct try_to_lock_type; struct accept_ownership_type; static const defer_lock_type defer_lock; static const try_to_lock_type try_to_lock; static const accept_ownership_type accept_ownership; } namespace posix_time { } }
Describes a shared interprocess_mutex family fit algorithm used to allocate objects in shared memory.
namespace boost { namespace interprocess { struct mutex_family; struct null_mutex_family; } }
Describes a named condition class for inter-process synchronization
namespace boost { namespace interprocess { class named_condition; } }
Describes a named condition class for inter-process synchronization
namespace boost { namespace interprocess { class named_condition_any; } }
Describes a named mutex class for inter-process synchronization
namespace boost { namespace interprocess { class named_mutex; } }
Describes a named named_recursive_mutex class for inter-process synchronization
namespace boost { namespace interprocess { class named_recursive_mutex; } }
Describes a named semaphore class for inter-process synchronization
namespace boost { namespace interprocess { class named_semaphore; } }
Describes a named sharable mutex class for inter-process synchronization
namespace boost { namespace interprocess { class named_sharable_mutex; } }
Describes a named upgradable mutex class for inter-process synchronization
namespace boost { namespace interprocess { class named_upgradable_mutex; } }
Describes null_mutex classes
namespace boost { namespace interprocess { class null_mutex; } namespace posix_time { } }
Describes the scoped_lock class.
Describes the upgradable_lock class that serves to acquire the upgradable lock of a mutex.
Describes the upgradable_lock class that serves to acquire the upgradable lock of a mutex.
Describes a class representing a native windows shared memory.
namespace boost { namespace interprocess { class windows_shared_memory; } }
Describes a class representing a xsi key type.
namespace boost { namespace interprocess { class xsi_key; } }
Describes a class representing a native xsi shared memory.
namespace boost { namespace interprocess { class xsi_shared_memory; } }