Anonymous shared objects

Updated: April 19, 2023

Using an anonymous shared object eliminates the need for a publically visible name.

Traditionally, a shared memory object has a name, and QNX Neutrino shows those names under /dev/shmem. As a QNX Neutrino extension to POSIX, you can create an anonymous shared memory object. This has several advantages:

To create an anonymous shared memory object, specify SHM_ANON for the object's name when you call shm_open(). For example:

int fd = shm_open(SHM_ANON, O_RDWR, 0600);

How do you share an object that doesn't have a name? You use a shared memory handle.