Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual—522629-013
14-10
SEGMENT_ALLOCATE_ Procedure
•
If the swap file has not been opened in this processor by a previous 
call to SEGMENT_ALLOCATE_, the size of the segment will be set to 
segment-size, if supplied. If segment-size was not supplied, the size 
defaults to the size of the existing swap file.
•
If the swap file has already been opened in this processor by a prior 
call to SEGMENT_ALLOCATE_, the size of the segment will be set to 
the same size as the initally opened swap file, whether segment-size is 
supplied or not. (However, if segment-size is larger than the size 
specified in the original call to SEGMENT_ALLOCATE_, an error is 
returned.) 
filename:length input:input
STRING .EXT:ref:*, INT:value
indicates several types of swap files:  temporary swap space using KMSF, 
temporary swap file, existing permanent swap file, new permanent swap file, and 
segment sharing by the file-name method. If 
filename is specified, pin must be 
omitted.
•
Temporary swap space using KMSF
If you do not specify 
filename or if you specify length as 0 (and if a 
segment is not being shared using the PIN method), SEGMENT_ALLOCATE_ 
uses the Kernel-Managed Swap Facility (KMSF) to allocate swap space. 
Applications that share segments by the file-name method cannot be put under 
KMSF unless the sharing is changed to use the PIN. If you need to share by 
the file-name method, it will be necessary to use a temporary swap file (see 
“Temporary swap file” below) or to pass a volume name where the swap file 
should be created.
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.
•
Temporary swap file
If supplied, if 
length is not 0, and if filename is a volume name without a 
subvolume or file identifier, SEGMENT_ALLOCATE_ creates a temporary 
swap file on the indicated volume. If you specify a system name, it must be the 
system name of the local node. You can convert a temporary file to a 
permanent file by renaming it with the FILE_RENAME_ procedure.
If you do not specify 
filename and bit 13 of the alloc-options parameter 
is set to 1, SEGMENT_ALLOCATE_ creates a temporary swap file on a 
volume that it chooses.










