Replies: 1 comment
-
@leiBravo Can you tell us a bit more about the use-case you are having? You could, of course, use our low-level building blocks, but maybe the solution to your problem is a feature we will implement in the near future, and this could save you a lot of time. The construct you are looking for is this here: https://github.com/eclipse-iceoryx/iceoryx/blob/main/iceoryx_hoofs/posix/ipc/include/iox/posix_shared_memory_object.hpp You can create your own shared memory by calling: auto shm = PosixSharedMemoryObjectBuilder()
.name("my_shm_name")
.memorySizeInBytes(1234)
.accessMode(AccessMode::READ_WRITE)
.openMode(OpenMode::OPEN_EXISTING)
.create()
.expect("Successful shm creation");
shm.getBaseAddress(); // return void* to the start of the shared memory But I would recommend not pursuing this. Now, you have to handle all the things we handle within iceoryx:
Btw. iceoryx2 comes already with much more advanced features than good old iceoryx - you could also check this out and see if it provides the things you need. |
Beta Was this translation helpful? Give feedback.
-
Hello Iceoryx team,
Thank you for your excellent work on Iceoryx! I am currently exploring Iceoryx for inter-process communication and I would like to leverage its low-level shared memory capabilities without using the full middleware stack (e.g., pub/sub).
Could you provide a simple example or guidance on how to use Iceoryx for purely managing shared memory at a low level? Specifically, I am interested in:
SharedMemoryObject
or other relevant APIs.I have seen examples of Iceoryx's pub/sub architecture, but I am looking for more granular control over shared memory for specific use cases.
Any advice or examples would be greatly appreciated!
Thank you in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions