Guardian Procedure Calls Reference Manual

pin
input
INT:value
if present and not equal to -1, pin is specified and requests allocation of a segment that is
shared by the PIN method. The pin value is the process identification number (PIN) of the
process that has previously allocated the segment and with which the caller wants to share the
segment. The process designated by pin must be in the same processor as the caller. Processes
sharing a segment by this method must reference the segment by the same segment-id.
If pin is specified, filename must not be specified.
segment-type
input
INT:value
describes the attributes of the segment to be allocated:
Read-only
A read-only segment is a data segment that is initialized from a preexisting swap file and
used only for read access. A read-only segment can be shared by either the PIN or file-name
method. It can also be shared by file name between processes in different processors.
Note that the filename and length parameters must specify the name of an existing
swap file that is not empty. Extensible read-only segments are not supported.
Shared by file name
A filename must be specified when this type of shared segment is allocated. Processes
sharing segments by the file-name method can refer to the address space by different
segment IDs and can supply different values for the segment size to
SEGMENT_ALLOCATE[64]_. The segment size supplied by the first allocator of a particular
shared segment (as identified by the swap file name) establishes the upper limit for the
segment size that can be set by processes subsequently attempting to share the segment.
Callers that request sharing by file name must not supply the pin parameter.
Extensible
An extensible segment is a data segment for which the underlying swap file disk space is
not allocated until needed. In this case, segment-size is taken as a maximum size and
the underlying virtual memory is expanded dynamically as the user accesses addresses
within the extended data segment. When the user first accesses a portion of an extensible
segment for which the corresponding swap space has not been allocated, the operating
system allocates space from KMSF (for a KMSF-backed segment) or another extent for the
swap file (for a file-backed segment). If the swap space cannot be allocated, the user
process is interrupted: a TNS Guardian process receives a "no memory available" trap
(trap 12); an OSS or native process receives a SIGNOMEM signal. The default response
to this trap or signal is process termination.
If segment-type is omitted, the default value is 0. Values are defined in KMEM[.h]; valid
values for unprivileged callers are:
SEGMENT_TYPE_NONRESIDENT (0)
If pin is not specified, create a read/write, non-extensible segment; if filename is
specified, create a file-backed segment that disallows sharing by file-name. If pin is
specified, share a segment by the PIN method with the access appropriate to the segment:
read-only if the segment is read-only, read/write if the segment is read/write.
1264 Guardian Procedure Calls (S)