Questions tagged [boost-interprocess]

Boost.Interprocess is a part of the C++ Boost library. It simplifies the use of common interprocess communication and synchronization mechanisms.

371 questions
1
vote
2 answers

RAM-disk vs Boost interprocess communication

To let a set of processes communicate, what are the advantages and disadvantages between: RAM-disk Boost interprocess communication A RAM-disk allows to communicate with programs that only use files. How big is the performance penalty of a…
Pietro
  • 12,086
  • 26
  • 100
  • 193
1
vote
1 answer

boost::interprocess::timed_receive() never returns if sending process halts

I thought that calling timed_receive() would just time out in this case, but instead it gets stuck attempting to lock a mutex. So is there a function that I can call on my que, before attempting to receive data, which tells me if the sending process…
1
vote
1 answer

Retrieving shared vectors from Boost InterProcess Shared Memory

I have created a Boost Shared memory, for the purpose of sharing vectors. The sharing has been accomplished. However, I do not understand how the vectors are pushed into shared memory. I do a push_back to the shared memory from the writing process.…
user1173240
  • 1,455
  • 2
  • 23
  • 50
1
vote
1 answer

Issue with removing boost::interprocess::named_mutex

I did below program, but it failed to delete the named_mutex in the end, print out result of "Mutex delete failure" void IPC::testNamedMutex() { named_mutex mutex(open_or_create, "MyMutex"); for (int i = 0; i < 10; i++) { mutex.lock(); cout…
Michael
  • 673
  • 2
  • 5
  • 23
1
vote
0 answers

Boost Interprocess Security Error while opening Shared Memory File

I'm trying to use Boost Interprocess mechanisms, specifically shared memory for vectors. So in my client application which tried to access the shared memory file, to read the shared data, all I get is an error_info which points to Security Error,…
user1173240
  • 1,455
  • 2
  • 23
  • 50
1
vote
0 answers

Interprocess shared memory with boost

I'm writing a server client application which I want to implement using boost interprocess shared memory APIs. The client process writes an integer key into shared memory and server reads that key, do some work and writes result variable is same…
brunoos
  • 81
  • 1
  • 2
  • 6
1
vote
2 answers

IPC through two different executables?

I have the following problem, and I understand that I need to use either IPC via shared memory or network sockets. I have one executable (meaning a separate .exe), compiled with VS2010, that gets the data from somewhere, and it should make that data…
Ela782
  • 5,041
  • 5
  • 53
  • 66
1
vote
1 answer

Segfault on writing to a Shared Memory Queue

I created boost deque on a shared memory using boost managed shared memory. I have one process ( process A ) that pushes data to the back of the queue and another process (process B )that reads from the front of the queue and pops the front. My…
slash_axl
  • 61
  • 1
  • 4
1
vote
1 answer

boost IPC string length segfault?

I have a very small example of two programs, one to write a shared memory segment and another to read from it. I realise there are potentially issues with std::string (and other containers) so have tried boost::interprocess::string which is a…
dirvine
  • 57,399
  • 2
  • 18
  • 19
1
vote
1 answer

Shared memory between mingw and visual studio application

Is it possible to share a memory region between an application compiled with MinGW and one with Visual Studio ? I am relying on boost interprocess: shared_memory_object shm (create_only, "MySharedMemory", read_write); shm.truncate(1000); …
tssch
  • 734
  • 8
  • 25
1
vote
2 answers

How to get information about free memory from /dev/shm

I need a way in C or C++ to get the free memory available from /dev/shm . Note that on my ARM architecure on Linux, unfortunately, ipcs reports a wrong max. available memory information, but df -h correctly gives me the current available memory from…
Martin
  • 9,089
  • 11
  • 52
  • 87
1
vote
2 answers

Boost IPC Message_Queue try_receive throws interprocess_exception::library_error

I am making interprocess communication between two of my processes with boost::interprocess::message_queue. This is the first time I'm using it so this exception isn't clear to me because I cannot find any documentation on it. I have my classes…
Gizmo
  • 1,990
  • 1
  • 24
  • 50
1
vote
1 answer

C++ Sharing Large Arrays and Data Structures Between MPI Processes

I have a program that currently generates large arrays and matrices that can be upwards of 10GB in size. The program uses MPI to parallelize workloads, but is limited by the fact that each process needs its own copy of the array or matrix in order…
Andrew O
  • 68
  • 6
1
vote
1 answer

Using Boost flyweight with shared memory

I'd like to keep a large number of (frequently duplicated) strings in shared-memory, so I'm using Boost's flyweight and interprocess basic_string functionality. To ensure that the string is actually stored in the shared-memory, I need to supply a…
bovine
  • 5,303
  • 2
  • 18
  • 17
1
vote
1 answer

boost shared_memory_object stores content in disk?

I'm training multiple networks based on a single database. So to accelerate speed and reduce disk reading, I use shared_memory_object class provided by boost. Since the lab workstation is currently unavailable, I migrated my code to my personal…
Adrian Yu
  • 84
  • 1
  • 5