Guardian Procedure Calls Reference Manual

in turn, uses the base-address parameter as an input parameter to allocate the segment in
the same place.
Use the base-address input parameter only if it is necessary to force segment allocation
to begin a flat segment at a specific address. The specified address must be a multiple of
32 kilobytes on G-series systems and a multiple of 16 kilobytes on H-series or J-series
system. Avoid hard-coding the address, because the valid range of addresses can change
from RVU to RVU. An error is returned if the address is out of range, if the address is not
properly aligned, or if the allocated segment would overlap a previously allocated segment.
For a shared flat segment, the base-address input parameter maps the shared segment
starting at the base specified address. If base-address is omitted,
SEGMENT_ALLOCATE_ attempts to map the segment at the same base address as in the
process that first allocated the segment. If that process no longer shares the segment, the
default address is taken from one of the processes that still shares the segment. The
SEGMENT_ALLOCATE_ call in the sharer will fail with error 15 in the following cases:
Another segment in the sharer is already mapped at this base-address, OR
The address range of the segment to be shared overlaps with that of another segment
in the sharer.
For a selectable segment, the base-address input parameter is ignored, because the
base address assigned to a selectable segment is always the same.
The segment-size, max-size, and base-address parameters interact to determine flat
segment placement in the address space. See “Flat segment alignment and address space
fragmentation” under Considerations (page 1268).
max-size
input
(for SEGMENT_ALLOCATE_)INT(32):value
(for SEGMENT_ALLOCATE64_)INT(64):value
defines the upper limit of the new-segment-size parameter of the SEGMENT_RESIZE64_
or RESIZESEGMENT procedure. The value for max-size must be greater than or equal to the
segment-size parameter and must be within the same range as the segment-size
parameter. A parameter error is reported if max-size exceeds an arbitrary
implementation-dependent limit larger than the flat address space. If omitted, max-size defaults
to segment-size for a flat segment, or to 127.5 megabytes for a selectable segment.
When a segment is allocated, address space is reserved for max-size, but only
segment-size is accessible. For a non-extensible segment, swap space is allotted for
segment-size; for an extensible segment swap space is allotted as the segment is extended.
The segment-size, max-size, and base-address parameters interact to determine flat
segment placement in the address space. See “Flat segment alignment and address space
fragmentation” under Considerations (page 1268).
alloc-options
input
INT:value
provides information about the segment to be allocated. The value is the sum of one or more
of the following terms, which are defined in KMEM[.h]. Each value is a single bit (power of
two). All unspecified bits must be 0. The following table shows values and names of the subset
1266 Guardian Procedure Calls (S)