Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

shmat(2) OSS System Calls Reference Manual
Shared Segment Memory Alignment
On servers running J06.12 or later J-series RVUs, or H06.23 or later H-series RVUs:
If shmaddr is nonzero and rounding is specified, the specified address is rounded to a
multiple of 4 MB.
If shmaddr is nonzero and rounding is not specified, the specified address must be a
multiple of 16 KB.
If shmaddr is zero, the system chooses an address that is a multiple of at least 16 KB.
The SHMLBA constant is irrelevant.
On servers running earlier J-series RVUs, earlier H-series RVUs, or G-series RVUs:
If shmaddr is nonzero and rounding is specified, the specified address is rounded to a
multiple of 32 MB.
If shmaddr is nonzero and rounding is not specified, the specified address must be a
multiple of 32 KB.
If shmaddr is zero, the system chooses an address that is a multiple of at least 16 KB
(but not necessarily a multiple of 32 MB). The SHMLBA constant is 32 MB.
Number of Shared Segments
On servers running J06.12 or later J-series RVUs, or H06.23 or later H-series RVUs, there is no
configured limit to the number of OSS shared memory segments that can be attached by one pro-
cess. The number of OSS shared memory segments that can be attached is limited by system
resources only.
On servers running earlier J-series RVUs, earlier H-series RVUs, or G-series RVUs, a process
can attach no more than 13 segments at one time.
Propagation During Process Creation
Segments attached to a parent process are also attached to a child process created by the fork()
or tdm_fork( ) function.
Segments attached to a parent process are not propagated by a call to:
Any of the exec or tdm_exec sets of functions
Any of the tdm_spawn or PROCESS_SPAWN_ set of functions
The resulting child process has no attached shared memory segments.
Use From the Guardian Environment
On servers running J06.12 or later J-series RVUs, or H06.23 or later H-series RVUs, Guardian
processes can attach shared memory segments. Permissions are handled in the same way for
both OSS and Guardian processes.
If called from a Guardian process on servers running J06.11 or earlier J-series RVUs, H06.22 or
earlier H-series RVUs, or G-series RVUs, this function call fails and errno is set to the value of
[ENOTOSS].
NOTES
The shared memory identifier, shmid, is not the Guardian environment segid value or segment
identifier.
Programs should not be written to depend upon the maximum number of attached shared seg-
ments. This limit is subject to change.
778 Hewlett-Packard Company 527186-023