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
0 answers

boost ipc warning - on inclusion of managed_shared_memory

Hi I get the following warnings g++ -std=c++0x -Wall -c -I/usr/local/boost_1_53_0 -I/home/aditya/CodeBase/includes MAIN.cpp In file included from /usr/local/boost_1_53_0/boost/interprocess/detail/managed_open_or_create_impl.hpp:15:0, …
Aditya Sihag
  • 5,057
  • 4
  • 32
  • 43
1
vote
0 answers

boost::interprocess::message_queue constructor failing

boost::interprocess::message_queue constructor failing when processes are run under different users. To be more concrete. I'm creating message_queue in proc1. and trying to open the same message_queue from proc2 (another user). Is it possible to…
denys
  • 2,437
  • 6
  • 31
  • 55
1
vote
1 answer

Boost Interprocess Lock persistence

I have the following code which crashes. I suspect this is because of allocating a reference to the stack that I have this problem. But I want to avoid the cost of having to stack allocate a mutex, and a scoped lock every time class Cache { …
user1018513
  • 1,682
  • 1
  • 20
  • 42
1
vote
1 answer

Adapt Boost Thread / Process for non supported platform

Background this documentation says that it is possible to adapt the library to new (unsupported) operation system. Because the OS (a real time OS) I would like to support is close to Win32, I would expect little code changes. I have no experience…
ToBe
  • 921
  • 1
  • 9
  • 23
1
vote
1 answer

boost::interprocess - allocate_aligned in shared memory?

If I use allocate_aligned to allocate an aligned memory block within a chunk of shared memory, how do I then identify that same block in another process ? E.g. managed_shared_memory managed_shm(open_or_create, "SharedMemory", 65536); void *ptr =…
Paul R
  • 208,748
  • 37
  • 389
  • 560
1
vote
0 answers

Handling core dumps when holding boost::interprocess shared memory lock

I am working on application where several multi-threaded processes are attempting to acquire a lock on the shared memory files managed via boost::interprocess (scoped_lock on named_mutex). It appears that if one of these processes dumps a core while…
user1474341
  • 125
  • 1
  • 12
1
vote
1 answer

How to use Boost Interprocess Message Queue for Windows?

I am implementing inter process communication using Boost Interprocess. As a test I took the example from the boost documentation. The first process (which creates the message queue) starts the other (which should receive the messages from the…
c_k
  • 1,746
  • 1
  • 20
  • 35
1
vote
2 answers

How to get the name of a boost::interprocess::managed_shared_memory

I created a managed_shared_memory object with an name and size. Afterwards, I would like to get the name again. How do I do this? I would expect there to be a function like get_name or something like that, but I could not find one. #include…
Max
  • 340
  • 2
  • 15
1
vote
1 answer

boost::interprocess::map insert gives: ambiguous call to overloaded function

I'm trying to insert some values into a boost::interprocess::map stored in a shared memory. The problem is that it gives me "ambiguous call to overloaded function" when I try to compile it and I'm not sure why. Here are some code snippets: #include…
George Ferreira
  • 103
  • 2
  • 9
1
vote
1 answer

boost::interprocess::map - how to update value with basic_string as type

I have the following codes: typedef managed_shared_memory::segment_manager segment_manager_t; typedef allocator void_allocator; typedef allocator char_allocator; typedef…
1
vote
1 answer

boost::interprocess memory size

I have a managed_shared_memory objects that holds the map container SharedMap defined as follows. typedef std::pair ValueType; typedef allocator ShmemAllocator; typedef…
andre
  • 7,018
  • 4
  • 43
  • 75
1
vote
1 answer

How to hold a Boost upgradable_lock for the lifetime of an object?

I'm implementing a pair of classes for interprocess communication where one process will be the only writer and there will be many readers. One class handles reading; one handles writing. To prevent any other process from ever becoming the writer,…
bythescruff
  • 1,869
  • 2
  • 17
  • 33
0
votes
1 answer

Truncating an existing fstream that has been locked by boost::interprocess

What would happen if I reopen an fstream with data in it using the std::ios::trunc flag without closing a process and whilst my process holds a boost::interprocess::file_lock()? Should I expect the OS to maintain my file lock? Or will the OS…
Hassan Syed
  • 20,075
  • 11
  • 87
  • 171
0
votes
2 answers

Boost interprocess vector, creating multiple vector pointers

I want to insert a shared vector into a shared map using the following code: managed_shared_memory segment(create_only ,"MySharedMemory" ,65536); typedef allocator vecAllocator; typedef vector
Prasanth Madhavan
  • 12,657
  • 15
  • 62
  • 94
0
votes
0 answers

Boost.Interprocess. Using shared memory

I am considering using shared memory from Boost.Interprocess library to communicate between parent & child processes (running on the same machine). The C++ library I am developing is to be used on Windows & Linux. I read the docs and did some…
M.K.
  • 159
  • 8