[ros-sig-ipc] Rosinstall Ach and a New Idea
|This message is part of the following thread:|
|the complete thread tree sorted by date|
- Publisher: (1) Call shm_open and mmap to create an arbitrary shared memory file. (2) Call shm_unlink to unlink the shared memory file in the file system. Publisher still has it open. (3) Copy/serialize/generate the message into the mmap'ed shared memory file. (4) Send the /FILE DESCRIPTOR/ to all subscribing processes via a Local-Domain socket or POSIX message queue. (5) Munmap and close the shared memory file. - Subscriber: (1) Receive the file descriptor from publisher. (2) Mmap the file descriptor. (3) Operate on data in the shared memory file. (4) Munmap and close the shared memory file. - OS Kernel: - Keeps track of reference counts to the underlying physical memory for the shared memory file. - Garbage-collects that physical memory when all processes close the file.