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
0
votes
0 answers
Boost Combination with networking and shared memory for Inter Process Communication
This seems like a trivial question for me, but I could not find the answer for it..
I am trying to think of a module of master and multiple slaves (Sends all of them data and receives from all of them results), and I've been looking to some IPC…

Alon
- 1,776
- 13
- 31
0
votes
1 answer
How to read/write vector as memory mapped file(s)?
I have a large set of data chunks (~50GB). In my code I have to be able to do the following things:
Repeatedly iterate over all chunks and do some computations on them.
Repeatedly iterate over all chunks and do some computations on them, where in…

Frank
- 64,140
- 93
- 237
- 324
0
votes
2 answers
Boost interprocess string without shared memory
So, this question is linked to a previous one (std::string without copying from char*).
Now I've come across boost:interprocess::string, which allows the construction of strings inside a shared memory address space. Since I've already got my char*…

senseiwa
- 2,369
- 3
- 24
- 47
0
votes
1 answer
boost named_condition is not waking up waiting process
I have 2 processes (producer and consumer) sharing an int deque in shared memory, I have the producer process put 2 numbers in the deque and then it gets in a wait state losing its mutex lock. I then have the consumer process removing the numbers…

rudasi
- 185
- 2
- 14
0
votes
2 answers
boost::interprocess::interprocess_condition::wait does not atomically unlock mutex while waiting
As the current post title saying about it, the boost boost::interprocess::interprocess_condition::wait is suppose to atomically unlock mutex while it waits, but it doesn't.
In the following code:
boost::interprocess::scoped_lock<…

Me as is
- 57
- 1
- 7
0
votes
1 answer
Boost message queues between processes that have more than a single thread (boost threads)
I develop an interactive protocol on C++ between N processes that communicate with each other via boost message_queue queues. One of the processes has 2 execution threads, a main thread that uses the queues, and a "helper" thread which listens to…

Edgepo1nt
- 303
- 2
- 13
0
votes
1 answer
creating scoped_lock for 200 ms max
I am trying to create a timed scoped lock on mutex. I thought following api from boost could help but I am having hard time finding some sample code as reference to use it.
scoped_lock(mutex_type & m, const boost::posix_time::ptime & abs_time);
I…

RLT
- 4,219
- 4
- 37
- 91
0
votes
2 answers
IPC between 32 bit and 64 bit boost processes
My platform is Visual Studio 2012 and I need to implement IPC between 32 bit and 64 bit processes. I have source code for all binaries but for several reasons one processes should remain 32 bit. I have looked into boost manual and it seems that…

pic11
- 14,267
- 21
- 83
- 119
0
votes
1 answer
boost json serialization and message_queue segfault
i'm making some test with boost interprocess and ptree structure, i have a segfault when i try to read the message sent(or when i try to parse it in json).
i'm using boost1.49 on debian linux.
i'm serializing it in json for later uses, and because i…

kurojishi
- 321
- 1
- 4
- 12
0
votes
0 answers
Can I rewrite this boost interprocess set of typedefs and avoid the name length exceeded warning in vc 2008?
Is this warning about name length always harmless? If not, how do I know if I'm in trouble?
One lovely thing in C++ type manging is when name length is exceeded. The linked question shows how to turn it off. I am using Visual C++ 2008 with Boost…

Warren P
- 65,725
- 40
- 181
- 316
0
votes
1 answer
What is the correct way to dispose of a C++ object created with boost::interprocess STL compatible shared memory allocators?
I'm a little confused about Boost::interprocess shared memory and deallocation.
When creating a new object on the stack in C++, you simply declare the type, the variable name, and the parameters to the constructor (unless you want a default…

Warren P
- 65,725
- 40
- 181
- 316
0
votes
1 answer
Boost interprocess message_queue has non const get_num_msg(). Why?
In boost 1.53 the message_queue_t has this member function:
size_type get_num_msg();
This returns the number of messages currently stored. Never throws. I don't see any reason why this can't be const.

Gabor Marton
- 2,039
- 2
- 22
- 33
0
votes
1 answer
boost interprocess unordered_map string
I am trying to create a unordered_map in shared memory using Boost Interprocess library. Here, is the code, which I'm trying to use (taking examples from Boost Interprocess documentation):
#include…

Lazylabs
- 1,414
- 16
- 23
0
votes
0 answers
atomic_cas32 in boost interprocess library
What does the following lines of code does ?
boost::interprocess::detail::atomic_cas32( &m_shutdown, 1, 1 ) == 1
According to the documentation, it does the following thing
//! Compare an boost::uint32_t's value with "cmp".
//! If they are the same…

asit_dhal
- 1,239
- 19
- 35
0
votes
1 answer
How to correctly unmap shared memory in boost::interprocess?
I'm using boost::interprocess::managed_shared_memory for interprocess communication. In order to grow/shrink, the shared memory must be unmapped in every process using it. Given I have a two threads, how is this done?
As far as I searched the boost…

user1228633
- 521
- 1
- 6
- 16