When creating a new shared memory segment, size indicates the desired size of the new segment in bytes. The size of the segment may be rounded up to a multiple convenient to the kernel (i.e., the page size).
Size specified is greater than the size of the previously existing segment. Size specified is less than the system imposed minimum, or greater than the system imposed maximum.
[ENOENT]
No shared memory segment was found matching key, and IPC_CREAT was not specified.
[ENOSPC]
The kernel was unable to allocate enough memory to satisfy the request.
[EEXIST]
IPC_CREAT and IPC_EXCL were specified, and a shared memory segment corresponding to key already exists.