Boost.Interprocess is a part of the C++ Boost library. It simplifies the use of common interprocess communication and synchronization mechanisms.
Questions tagged [boost-interprocess]
371 questions
1
vote
0 answers
What pthread functions are used by boost interprocess?
I am using boost::interprocess to implement an IPC mechanism based on shared memory. I want this to be cross platform (including windows), and the build system is autotools. On some platforms boost::interprocess requires that you link with the…

crobar
- 2,810
- 4
- 28
- 46
1
vote
1 answer
Boost.interprocess Vector as class member
I would like to place a struct in a shared memory using Boost.Interprocess. This struct will be shared between two processes as a main exchange zone for serialized data. I am currently searching for the best solution in term of simplicity.
namespace…

poukill
- 540
- 8
- 18
1
vote
1 answer
A puzzle about boost::interprocess::managed_shared_memory->size
i have two programs.
#include
#include
int main(int argc, char const* argv[])
{
boost::interprocess::shared_memory_object::remove("High");
try {
…

Wonter
- 293
- 1
- 5
- 15
1
vote
0 answers
Boost condition variable with sharable mutex
In Boost interprocess, is it possible to use a condition variable with a sharable mutex? I have one writer and multiple readers that need to wait on the writer.
More specifically, using named_condition_any::wait fails because it internally calls…

LanguagesNamedAfterCofee
- 5,782
- 7
- 45
- 72
1
vote
1 answer
Accessing vector element of shared object using boost interprocess
I'm trying to understand how boost interprocess library works.
I have an Equipment class which holds integer values in a vector container.
In parent parent process;
I constructed Equipment object in MySegmentObject segment, and in the constructor…

penguru
- 4,342
- 11
- 46
- 56
1
vote
0 answers
Compatible bitset with boost::interprocess
I am using gcc-4.4.5 which doesn't support pointer_traits (no way to change this) Porting to an older system
Does anyone know of a boost::interprocess compatible bitset, I was using
vector

SuspiciousPineapple
- 95
- 8
1
vote
1 answer
boost::circular_buffer how to handle overwrite shift
I have 2 processes: a producer and "consumer" which still leaves the values insider the buffer and they will just be overwritten.
But having the consumer keep track is posing a bit of a problem. When the buffer is full and values get overwritten,…

Joe Staines
- 301
- 1
- 3
- 11
1
vote
1 answer
template meta-programming how to specialize on a collection
I have the following UtlSharedIPCWrapper template class that I created access a user defined type that is placed in inter-process memory.
Normally this class is used with a simple type for example:
// construct a FaultReport - default to no…

johnco3
- 2,401
- 4
- 35
- 67
1
vote
0 answers
sharing a custom struct using boost::interprocess
I need to allocate a user defined struct in shared memory using boost's managed_shared_memory but I am not sure how to go about this correctly. It appears that the key to getting this to work correctly is the use of custom allocators. I have…

johnco3
- 2,401
- 4
- 35
- 67
1
vote
0 answers
Shouldn't block operations always be interruptible?
In my opinion, all block operations should provide some mechanism to interrupt the wait and have the thread return cleanly, just like the alertable wait operations in Windows API. However, other than Windows API, such a feature is hardly seen. I…

Lingxi
- 14,579
- 2
- 37
- 93
1
vote
1 answer
boost::named_mutex: Safely cleaning up when last process closes
I have a resource which I need to protect access to within a process, and across multiple processes. I've managed this by creating a named mutex via boost::interprocess:named_recursive_mutex, and it works great.
#include…

Cloud
- 18,753
- 15
- 79
- 153
1
vote
1 answer
Boost interprocess Win32, x64
I want to communicate between different platforms using boost interprocess.
I am using vc12 and boost 1.58 on windows 7.
My code below is a very simple example, that should work. But it doesn't for communications between diffrent platforms...
If I…

Viatorus
- 1,804
- 1
- 18
- 41
1
vote
1 answer
Cross process memory managment
I wish to allocate data on a shared memory segment in one process and free it in another.
I allocate it in process 1 (Proc1) using the following line:
new_Class* pData = managed_windows_shared_memory_segment.construct(anonymous_instance)…

Eyal
- 161
- 1
- 9
1
vote
1 answer
C++ Syntax: return statement with space after "template"; what does it mean
TL;DR:
What does the following Syntax for the functions return type and the return statement mean? (Code from boost::interprocess)
template
typename segment_manager::template construct_proxy::type
construct(char_ptr_holder_t name)
{…

ted
- 4,791
- 5
- 38
- 84
1
vote
1 answer
Getting pointers to managed_shared_memory of boost interprocess
In all examples of boost interprocess, I only see it being initialized in main().
#include
#include
using namespace boost::interprocess;
int main()
{
…

Nav
- 19,885
- 27
- 92
- 135