- Allocating a new shared memory segment causes virtual memory pages to be created.
- To permit a process to use the shared memory segment, a process attaches it, which adds entries mapping from its virtual memory to the segment's shared pages.
- When finished with the segment, these mapping entries are removed. When no more processes want to access these shared memory segments, exactly one process must deallocate the virtual memory pages.
- All shared memory segments are allocated as integral multiples of the system's page size, which is the number of bytes in a page of memory. On Linux systems, the page size is 4KB, but you should obtain this value by calling the getpagesize function.
2006-03-31