October 2017
Intermediate to advanced
354 pages
9h 28m
English
The shared memory region must be attached to its address space for a process to access it. shmat() is invoked to attach the shared memory to the address space of the calling process:
void *shmat(int shmid, const void *shmaddr, int shmflg);
The segment indicated by shmid is attached by this function. shmaddr specifies a pointer indicating the location in the process's address space where the segment is to be mapped. The third argument shmflg is a flag, which can be one of the following: