Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual—522629-013
14-15
SEGMENT_ALLOCATE_ Procedure
The default value of alloc-options is all bits equal to 0, which means that a
selectable segment is allocated and the base address is returned in the
base-
address parameter.
Considerations
•
Preventing automatic temporary file purge
SEGMENT_ALLOCATE_ opens the swap file for read/write/protected access. A
process can prevent the automatic file purge of a temporary swap file by opening
the file for read-only/shared access before the segment is deallocated.
•
Nonexisting temporary swap file
A caller requesting allocation of a temporary swap file can obtain the actual file
name returned by making a subsequent call to SEGMENT_GETINFO_.
•
Swap file extent allocation
If an extensible segment is being created, then only one extent of the swap file is
allocated when SEGMENT_ALLOCATE_ returns.
•
Segment sharing
Subject to security requirements, a process can share a segment with another
process running on the same processor. For example, process $X can share a
segment with any of the following processes on the same processor:
•
Any process that has the same process access ID (PAID)
•
Any process that has the same group ID, if $X is the group manager (that is, if
$X has a PAID of
group,255)
•
Any process, if $X has a PAID of the super ID (255,255)
If processes are running in different processors, they can share a segment only if
the security requirements are met and the segment is a read-only segment. To
specify a read-only segment, set bit 2 of the
segment-type parameter.
Callers of ALLOCATESEGMENT can share segments with callers of
SEGMENT_ALLOCATE_. High-PIN callers can share segments with low-PIN
callers.
•
Segment sharing by the file-name method
In segment sharing by the file-name method, a read-write segment cannot be
shared with read-only access.
•
Sharing flat segments
A process cannot share a flat segment with a process that allocated a selectable
segment, because the segments reside in different parts of memory. (Similarly, a
Note. There are additional considerations for privileged callers.