8.7. System V Shared Memory
In addition to memory-mapped files, HP-UX provides support for shared memory through the System V Shared memory API. This API consists of the shmget(2) call to allocate a memory object, the shmat(2) call to attach to an allocated region, shmdt(2) to detach from a region, and shmctl(2) for controlling attributes of the shared memory region. There are also three HP-UX tunable parameters, shmmax, shmmni, and shmseg, that control the shared memory system behavior.
8.7.1. Allocating Shared Memory
To allocate a shared memory region of a specific size, the shmget(2) system call is made. This returns a shared memory identifier that can be used to later attach to the shared memory segment. Be aware that the size of the shared ...