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
1 answer
Boost interprocess flat_map operator[] compilation errors
I'm building some wrapper over the boost::interprocess::flat_map, the problem is, that i'm unable to use operator[] or at for some reason. When i'm using find or insert it compiles succesfully.
typedef…

trvecvlt
- 102
- 1
- 10
1
vote
1 answer
boost interprocess managed_mapped_file find failing
I am trying to share a structure across processes using interprocess in Boost.
I've defined the mapped file to use null mutex because I was having problems with it locking and I don't mind doing the synchronisation myself.
What I am having problems…

Dave F
- 973
- 9
- 19
1
vote
0 answers
Managed anonymous shared memory with boost::interprocess
I am trying to share memory between processes after a fork(), boost::interprocess offers a way to do exactly this by using their anonymous_shared_memoryas shown here. However the library also provides managed_shared_memory objects which have very…

user3559888
- 1,157
- 1
- 9
- 12
1
vote
0 answers
C++ Fastest interprocess communication
I know that this is (somewhat) variable based on implementation and platform, but in general, what is the fastest method of inter-process communication in the following 2 areas:
1) Alerting other processes
2) Sharing data among processes
For…

jekelija
- 257
- 4
- 16
1
vote
0 answers
Boost::Interprocess Container Container Resizing No Default Constructor
After combing through the Boost::Interprocess documentation and Google searches, I think I've found the reason/workaround to my issue. Everything I've found, as I understand it, seems to be hinting at this, but doesn't come out and say "do this…

CuppM
- 1,668
- 4
- 19
- 30
1
vote
1 answer
Using STL containers for boost::interprocess::managed_shared_memory
Consider the following situation:
class Helper
{
public:
// Getters and setters are present!
private:
int i;
std::map shm;
}
int main()
{
…

CinCout
- 9,486
- 12
- 49
- 67
1
vote
3 answers
boost interprocess shared memory with class inside class
I need to create a structure in shared memory. This is an example of the classes:
struct A{
std::string str1;
int val;
}
struct B{
A inner;
std::string name;
}
I could not find an example of this in the web, but after some search i was able…

jpereira
- 251
- 2
- 11
1
vote
2 answers
How do I include Boost.Interprocess and Boost.DateTime properly?
This is a really basic question because I am a C++ newbie. I want to use the Boost.Interprocess library, but am having trouble building it. I'm trying to follow these instructions, but it's not working for me. Here is what I have:
#define…

Steph
- 2,135
- 6
- 31
- 44
1
vote
1 answer
Instantiating class with custom allocator in shared memory
I'm pulling my hair due to the following problem: I am following the example given in boost.interprocess documentation to instantiate a fixed-size ring buffer buffer class that I wrote in shared memory. The skeleton constructor for my class…

recipriversexclusion
- 13,448
- 6
- 34
- 45
1
vote
0 answers
Windows interproccess messaging without size limit
I have task to create messaging queue between processes that will not have size limit (up to 1 Mb, but most of messages are 128 bytes size).
So, I can't use:
boost::interproc::message_queue - has limited size;
zeromq (inproc://) - it is not…

Arkady
- 2,084
- 3
- 27
- 48
1
vote
1 answer
Boost interprocess anonymous condition timed_wait not compilable
I'm wondering what I'm doing wrong... with a sole wait it compiles and runs, but not with a timed_wait:
using boost::interprocess::scoped_lock;
using boost::interprocess::interprocess_mutex;
using…

moala
- 5,094
- 9
- 45
- 66
1
vote
0 answers
Share pointer between processes
I use boost multi_index in boost managed_shared_memory.
One of the data i save in the container is a pointer to a class allocated in shared memory.
The container and the pointer are in the same segment.
The container is used from multiple…

yaron
- 439
- 6
- 16
1
vote
1 answer
boost multi index insert compile error
I am trying to make a multi-index container in shared memory like in http://www.boost.org/doc/libs/1_55_0/doc/html/interprocess/allocators_containers.html#interprocess.allocators_containers.containers_explained
In my example i have a few keys…

yaron
- 439
- 6
- 16
1
vote
1 answer
boost::interprocess::managed_shared_memory: Grow(): Memory Reused?
I am using boost::interprocess::managed_shared_memory. Initially I allocate say X mb memory. When process ran out of memory, we grow the memory by a fixed value (say Y mb, perform unmap-> grow()-> map)
While growing, if contiguous memory is not…

user1989504
- 133
- 1
- 13
1
vote
1 answer
Boost Shared Memory validity
I'm using Boost Shared Memory to share a vector across processes.
In the client, how can I, once I try and open the shared memory and read a vector off it, realize if the memory is not valid, or is not what I'm looking for.
Will the Open_Only fail…

user1173240
- 1,455
- 2
- 23
- 50