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
Non virtual methods of basic_istream after upcasting to base reference
I have a set of classes that derive from basic_istream and ios_base like
std::stringstream,
boost::interprocess::basic_vectorstream,
boost::interprocess::bufferstream
At some point all those instances need to dump their content (emulated in the…

Lorah Attkins
- 5,331
- 3
- 29
- 63
0
votes
0 answers
unit-testing boost interprocess client
I have to unit-test a client of a shared memory map constructed using the boost interprocess. It is really awkward to create shared memory blocks for unit-testing. Normally I would use some static memory to simulate shared memory behavior during…

uuu777
- 765
- 4
- 21
0
votes
0 answers
How to clear neatlty all messages in Boost Interprocess Message Queue
I need to clear the content of a boost::interprocess::message_queue without removing it because some (sending) instances may be using it. There seems to be no member method to do so, so I did the following which works. Is there something…

c_drik
- 63
- 1
- 6
0
votes
0 answers
Ensuring thread-safe initialization of shared memory segments for IPC communication
I am implementing shared memory IPC for inter-process communication. I have created a class that consists of a ring buffer and a mutex. When the shared memory segment is created, the class object must be initialized in a thread-safe way to ensure…

arima
- 43
- 8
0
votes
0 answers
Parsed boost::spirit::qi::rule in memory mapped file
I have several large logical expressions (length upto 300K) of the form -
( ( ( 1 ) and ( 5933 or 561 or 1641 ) ) or ( ( 71 or 1 or 15 or 20 ) and ( 436 ) ) or ( ( 398 or 22 or 33 ) ) )
that are parsed using Boost Spirit (as shown in the example…

user1474341
- 125
- 1
- 12
0
votes
1 answer
Sending a POD type in shared memory without serializing
I have two processes P1 and P2 in my project. They use boost::interprocess::shared_memory to create a shared memory segment that is properly working (no problem with synchronization). My use-case consists of sending a POD type (a trivially copyable…

Akash
- 939
- 1
- 8
- 27
0
votes
0 answers
Pointer-like functionality in IPC
I have been working for a while with interprocess communication using Boost and have managed to pass big amounts of data between multiple processes/executables in POSIX. When reading from the shared memory i simply use memcpy. However, one chunk of…

Carl Wikström
- 85
- 5
0
votes
1 answer
Create a vector of custom struct in shared mem
I am working with boost multi index in shared memory
I create a struct SrHpackHeaderElement that contain shared strings
struct SrHpackHeaderElement
{
SrHpackHeaderElement(char_allocator*…

Hemda
- 1
0
votes
1 answer
Does boost::interprocess::named_mutex need to be stored in shared memory?
I want to use boost::interprocess to perform synchronization across multiple processes; in the specific I want to to use boost::interprocessnamed_mutex under Linux OS ( I am using g++ ) .
Do you know if each instance of this class has to be stored…

Abruzzo Forte e Gentile
- 14,423
- 28
- 99
- 173
0
votes
1 answer
Is there a built-in concurrency control in boost::interprocess::message_queue?
In a multiple producer-single consumer setting, is there a built-in concurrency control mechanism among the producer processes that are calling send() on the message_queue?
What happens if there are multiple instances of the consumer processes all…

Vectorizer
- 1,076
- 9
- 24
0
votes
0 answers
Building Boost with Process by Conan
I'm using Conan to manage my dependencies; my project requires Process and Interprocess components. How can I add these components to my Boost build with Conan? I'm using Boost 1.75 and Conan 1.44 on Windows 10

SigSegv
- 11
- 1
0
votes
0 answers
Is boost message_queue name the same as a named pipe?
Nowhere is this mentioned in the docs, is the name we use for creating a message_queue a named pipe on Windows? Suppose a C# application creates a NamedPipeServerStream with name "MyPipe". Can a C++ application do IPC with it if a message_queue uses…

demberto
- 489
- 5
- 15
0
votes
0 answers
Boost interprocess dont want to remove shared memory object before initialisation
I have this base class for using shared memory. Boost examples use a remover struct as below to handle the shared memory. Which I have adapted for my SharedMemBase class
//Remove shared memory on construction and destruction
struct shm_remove
…

mro47
- 83
- 5
0
votes
1 answer
How to get value of pointer member in struct with boost::interprocess
I am new to boost library. I am trying to use boost::interprocess to allocate a very simple data structure in shared memory. My struct looks like this:
struct test {
int* pInt;
float* pFloat;
};
Here is sender.cpp:
using namespace…

Hien Pham
- 11
- 3
0
votes
1 answer
Boost::interprocess message queue compatible with windows?
Windows 10
MSCV 19.25.28614.0
Boost 1.72.0
While attempting to initalise a basic message queue taken from sample code in the docs:
message_queue mq
(create_only //only create
, "message_queue" //name …

Tom
- 1,235
- 9
- 22