[Interprocess] Managed segment placement
Good morning, I'm using Boost::Interprocess' managed external buffer for my application. I would like to know whether it is possible or not to instantiate the segment manager object in a different place other than the buffer itself, so that the whole buffer is used exclusively for data. Thanks in advance, Jorge WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received. http://www.bsc.es/disclaimer
El 02/07/2014 9:22, Jorge Bellon escribió:
Good morning,
I'm using Boost::Interprocess' managed external buffer for my application.
I would like to know whether it is possible or not to instantiate the segment manager object in a different place other than the buffer itself, so that the whole buffer is used exclusively for data.
Thanks in advance,
Jorge
Hi Jorge, With the current design it's not possible. What's the use case for placing the manager outside the buffer? Best, Ion
Ion Gaztañaga
Hi Jorge,
With the current design it's not possible. What's the use case for placing the manager outside the buffer?
Best,
Ion
Hi Ion, Thank you for the info. The use case would be to manage a memory pool allocated on a remote node. This would be used by a run-time library for distributed programming. It would allocate a memory region and manage this memory from another node, so that we can perform operations with that piece of memory (allocate portions, transfer data, etc.) without the intervention of the local node. Regards, Jorge
El 03/07/2014 10:24, Jorge Bellon escribió:
Hi Ion, Thank you for the info.
The use case would be to manage a memory pool allocated on a remote node.
This would be used by a run-time library for distributed programming. It would allocate a memory region and manage this memory from another node, so that we can perform operations with that piece of memory (allocate portions, transfer data, etc.) without the intervention of the local node.
Why can't you put the manager in the remote node? The manager also needs
to allocate memory for indexes that track the position of named/unique
objects and that memory comes from the memory region also used to
construct objects. If you don't need named objects you can use a null
index to minimize used memory.
Do you need to shared this remote node memory between processes? If you
only use remote memory from a single process you can speed things a bit
using raw pointers:
typedef basic_managed_external_buffer <
char,
rbtree_best_fit
participants (2)
-
Ion Gaztañaga
-
Jorge Bellon