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
22
votes
8 answers

shared memory, MPI and queuing systems

My unix/windows C++ app is already parallelized using MPI: the job is splitted in N cpus and each chunk is executed in parallel, quite efficient, very good speed scaling, the job is done right. But some of the data is repeated in each process, and…
Blklight
  • 1,633
  • 1
  • 15
  • 14
20
votes
1 answer

How to communicate between php and boost library IPC?

I have client and server in php communicating over shared memory, Now I would like to access this shred memory object using Boost.Interprocess how can I access it? server.php: function create_image($str){ // Create a blank image and add some…
Arman
  • 4,566
  • 10
  • 45
  • 66
17
votes
3 answers

Mapping non-contiguous blocks from a file into contiguous memory addresses

I am interested in the prospect of using memory mapped IO, preferably exploiting the facilities in boost::interprocess for cross-platform support, to map non-contiguous system-page-size blocks in a file into a contiguous address space in memory. A…
aSteve
  • 1,956
  • 1
  • 20
  • 35
14
votes
1 answer

Boost::asio, Shared Memory and Interprocess Communication

I have an application that is written to use boost::asio exclusively as its source of input data as most of our objects are network communication based. Due to some specific requirements, we now require the ability to use shared memory as an input…
Chad
  • 18,706
  • 4
  • 46
  • 63
13
votes
2 answers

Is there a difference between boost iostream mapped file and boost interprocess mapped file?

I want to create a mapped binary file into memory; however I am not sure how to create the file to be mapped into the system. I read the documentation several times and realize there are 2 mapped file implementations, one in iostream and the other…
Yijinsei
  • 788
  • 2
  • 11
  • 20
12
votes
2 answers

Setting permission for shared memory created by boost

We open a boost shared memory that was created by another process like this boost::interprocess::managed_shared_memory segment(boost::interprocess::open_only, "SharedMem"); But if the process that created the shared memory was a root user, then…
Prasanth Madhavan
  • 12,657
  • 15
  • 62
  • 94
12
votes
2 answers

boost::interprocess message_queue performance - rather slow?

I need an ultra-fast MQ mechanism, where both sender and receiver are written in C++, on Windows platform. My current implementation using RCF-C++ for IPC is clocking at around 20,000 msg/sec over Windows Named Pipes. I am testing the perf of…
Omer Raviv
  • 11,409
  • 5
  • 43
  • 82
12
votes
2 answers

Is boost::interprocess ready for prime time?

I was working on a thread safe queue backed by memory mapped files which utilized boost interprocess fairly heavily. I submitted it for code review and a developer with more years of experience than I have on this planet said he didn't feel that…
MrEvil
  • 7,785
  • 7
  • 36
  • 36
12
votes
2 answers

Send complex data structure via boost message queue

I have the following data structure: typedef struct { short id; string name; short age; } person_struct; Using boost message queue, I tried to send this data structure to the message queue receiver in another process. However, after…
tanlccc
  • 363
  • 1
  • 5
  • 13
10
votes
2 answers

Example of how to use boost upgradeable mutexes

I have a multithreaded server application that needs mutex locks over some shared memory. The shared memory are basically sTL maps etc. Much of the time I'm just reading from the map. But, I also need to occasionally add to it. e.g. typedef…
hookenz
  • 36,432
  • 45
  • 177
  • 286
10
votes
1 answer

Boost::Interprocess Shared Memory Bus Error

I'm using CentOS 5.4 x86_64 and Boost 1.42.0 on a cluster that uses Open-MPI 1.3.3. I'm writing a shared library that uses shared memory to store large amounts of data for multiple processes to use. There's also a loader application that will read…
CuppM
  • 1,668
  • 4
  • 19
  • 30
10
votes
2 answers

How do I debug or fix the endless loop and heap corruption issue involving boost::interprocess managed_shared_memory?

I have the following "first-chance exception" message which is coming from a DLL I wrote which is running inside an executable that I did not write. That is, the DLL is a plugin. The first time this exception fires, an attempt to open a shared…
Warren P
  • 65,725
  • 40
  • 181
  • 316
10
votes
2 answers

64bit and 32bit process intercommunication boost::message_queue

Good day folks, I am currently trying to figure a way to pass data between a 64bit process and a 32bit process. Since it's a real-time application and both are running on the same computer I tough using shared memory (shm). While I was looking for…
samuel
  • 101
  • 3
9
votes
4 answers

boost interprocess named mutex remains acquired after a crash

I am using a boost::interpocess::scoped_lock using a named_mutex and a timeout; I am running in Linux OS. During one of my tests I had a crash: since then, everytime I try to run again the application, it gets stuck on the point where I created the…
9
votes
3 answers

How can I achieve something similar to a semaphore using boost in c++?

I noticed that boost does not seem to support semaphores. What's the easiest way to achieve a similar effect?
jonderry
  • 23,013
  • 32
  • 104
  • 171
1
2 3
24 25