Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (A-B)
Guardian Procedure Calls Reference Manual—522629-013
2-24
ALLOCATESEGMENT Procedure
(Superseded by SEGMENT_ALLOCATE_
•
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, refer to 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:
<8:15> 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 previously allocated the segment and with
which the caller wants to share the segment. This value is not used if