Guardian Procedure Calls Reference Manual
If a segment is being shared by the PIN method (see pin-and-flags), this rule applies to
the sharers:
• The segment-size parameter must be omitted and the size of the segment is the same
as that from the initial ALLOCATESEGMENT call.
If a segment is being shared by the file-name method (see pin-and-flags), these rules apply
to the sharers:
• The segment-size parameter is optional. If the segment is a read-only segment, the
default segment size is the length of the file (EOF). If the segment is a read-write segment,
the default segment size is the allocated size of the file.
• For a read-only segment, segment-size must not be greater than the end-of-file value
of the file; otherwise, an error occurs. For a read-write segment, segment-size must
not be greater than the segment size specified by the initial call to ALLOCATESEGMENT.
file-name
input, output
INT:ref:12
if present, is the internal-format file name of a swap file to be associated with the segment. If
the file exists, all data in the file is used as initial data for the segment. If the file does not exist,
one is created. Remote file names and structured files are not accepted. If the process terminates
without deallocating the segment, any data still in memory is written back out to the file.
ALLOCATESEGMENT must be able to allocate a sufficient number of file extents to contain all
memory in the segment.
The parameter can be a volume name with a blank subvolume and file; ALLOCATESEGMENT
allocates a temporary swap file on the indicated volume.
If you do not specify file-name and if a segment is not being shared using the PIN method,
ALLOCATESEGMENT uses the Kernel-Managed Swap Facility (KMSF) to allocate swap space.
To share this segment, use the PIN method; you cannot use the file-name method.
Performance is increased by using KMSF. However, if you want to save the data in the segment
after the process terminates, specify a permanent swap file name. KMSF swap files have the
clear-on-purge attribute, which provides a level of security for swapped data.
For more information on KMSF, see the Kernel-Managed Swap Facility (KMSF) Manual.
If a segment is being shared using the file-name method, file-name must be supplied. If a
segment is being shared using the PIN method, file-name must be omitted.
pin-and-flags
input
INT:value
Defaults to %040000. Its values are:
Optional PIN for segment sharing. Requests allocation of a shared segment that is shared by the
PIN method. This value specifies the process identification number (PIN) of the process that has
<8:15>
previously allocated the segment and with which the caller wants to share the segment. This value
is not used if bit 1 is set to 1 (see bit <1> later). A shared segment is an extended data segment
that can be shared with other processes in the same processor.
Not used; must be zero (0).<5:7>
If 1, requests allocation of an “extensible segment.” An extensible segment is an extended data
segment for which the underlying swap file disk space is not allocated until needed. In this case,
<4>
segment-size is taken as a maximum size and the underlying swap file is expanded dynamically
as the user accesses various addresses within the extended data segment. When the user first
accesses a portion of an extensible segment for which the corresponding swap file extent has not
been allocated, the operating system allocates the extent. If this extent cannot be allocated, the user
process terminates: a TNS Guardian process terminates with a “no memory available” trap (trap
12); an OSS or native process receives a SIGNOMEM signal.
60 Guardian Procedure Calls (A-B)