Guardian Procedure Calls Reference Manual

SEGMENT_TYPE_EXTENS (1)
If pin is not specified, create an extensible segment; if filename is specified, create a
file-backed extensible segment that disallows sharing by file-name. If pin is specified, share
an extensible segment by the PIN method. Extensible segments are read/write.
SEGMENT_TYPE_FILENAME (2)
Create a read/write segment with sharing by the file-name method enabled, or share a
read/write segment by the file-name method. filename must be specified.
SEGMENT_TYPE_EXTENS_FILENAME (3)
Create an extensible read/write segment with sharing by the file-name method enabled,
or share an extensible read/write segment with sharing by the file-name method. filename
must be specified.
SEGMENT_TYPE_READONLY (4)
If filename is specified, allocate a read-only file-backed segment, or share a read-only
segment by the file-name method. If pin is specified, share a segment; by the PIN method,
with read-only access (the segment being shared can be read-only or read/write). Either
filename or pin must be specified
SEGMENT_TYPE_READONLY_FILENAME (6)
Create a read-only segment, or share a read-only segment by the file-name method.
filename must be specified.
Additional segment-type values exist for privileged callers.
base-address
input, output
(for SEGMENT_ALLOCATE_)EXTADDR .EXT:ref:1
(for SEGMENT_ALLOCATE64_)EXT64ADDR .EXT64:ref:1
is by default an optional output parameter, returning the base address of the segment being
allocated. The base-address parameter can be used to determine whether the segment
allocated is a flat segment or a selectable segment. The base address of a segment also can
be obtained by calling the SEGMENT_GETINFOSTRUCT_ or SEGMENT_GETINFO[64]_
procedure (but SEGMENT_GETINFO_ cannot report the base address of a 64-bit segment).
For a flat segment, the base-address output parameter value is different for each
allocated segment.
For a selectable segment, the base-address output parameter value is always
%2000000D (%H00080000%D).
If alloc-options contains SEGMENT_OPTION_USE_BASE (the low-order bit is set),
base-address becomes a required input/output parameter: its referent specifies the base
address of the flat segment being allocated. A parameter error for base-address is reported
if the specified address would put any part of the segment outside the supported flat address
space. If the segment is selectable, any input value from the base-address parameter is
ignored.
A program should usually allow the SEGMENT_ALLOCATE[64]_ procedure to designate the
address where a flat segment should start. In particular, library procedures that allocate flat
segments should not specify a base address, because this allocation may be incompatible with
other library-allocated or user-allocated segments within the same process. This feature can be
useful for process pairs. For example, the primary process uses the base-address parameter
as an output parameter and supplies the address to its backup process. The backup process,
SEGMENT_ALLOCATE[64]_ Procedures 1265