Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual522629-013
14-8
SEGMENT_ALLOCATE_ Procedure
9 pin does not exist.
10
pin does not have the segment allocated.
11 Caller is trying to share segment with self.
12 Indicates one of three conditions: (1) The requested segment is a shared
selectable segment, but the allocated segment is a flat segment. (2) The
requested segment is a shared flat segment, but the allocated segment is a
selectable segment. (3) The segment is being resized.
13 The
segment-id parameter is already allocated by this process.
14 Unable to allocate process segment table (PST);
error-detail contains
the file-system error number.
15 Part or all of the requested address range has already been allocated. This
error is returned if bit 15 of the
alloc-options parameter is set to 1 and a
flat segment cannot be allocated. This error can also occur when bit 15 is not
set, but either a flat segment cannot be shared due to address-range overlap
with another segment or a flat segment cannot be allocated as there is no
unallocated address range large enough to hold the requested size. This error
is returned only on native processors.
segment-id input
INT:value
is the number by which the process chooses to refer to the segment. Segment IDs
are in the range 0 through 1023 for user processes; other values are reserved for
processes supplied by HP. A nonprivileged process cannot supply a segment ID
greater than 2047. Nonprivileged segment IDs are allocated as unaliased
segments.
segment-size input
INT(32):value
specifies the size in bytes of the segment to be allocated.
Flat segment size:
°
For G04.00 and earlier G-series RVUs, the value must be in the range 1
byte through 128 megabytes (134,217,728 bytes). A flat segment is
allocated beginning on a 32-megabyte region boundary and is allocated
from a total virtual space of 480 megabytes (15 regions * 32
megabytes/region).
°
For G05.00 and later G-series RVUs, the flat segment size limit is 1120
megabytes, theoretically. However, in a native mode process, the address
space used for flat segments in C / C++ applications is also used for the
heap. Flat segments, when allocated by Guardian, are assigned starting at
the highest address and going downward, whereas the heap starts at the
lowest address and grows upward. Therefore, for native mode programs,
the maximum segment size is not actually 1120 MB. The maximum
allowed depends on how much heap space the program uses. At best, a
native mode program has 1119 MB available for flat segments, and it could
have less available if the heap has grown to greater than 1 MB. An