Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (A-B)
Guardian Procedure Calls Reference Manual—522629-013
2-23
ALLOCATESEGMENT Procedure
(Superseded by SEGMENT_ALLOCATE_
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. Also, the 32-megabyte region boundary does not apply for these
RVUs.
For a selectable segment, the value must be in the range 1 byte through 127.5
megabytes (133,693,440 bytes).
The system might round the size up to the next
segment-size increment, where
the increment is both processor-dependent and subject to change. The only effect
this has on the program is that an address reference that falls outside the specified
segment size but within the actual size does not cause an invalid address
reference (trap 0 for a Guardian TNS process, a SIGSEGV signal for an OSS or
any native process), and a subsequent fetch might not retrieve the value previously
stored.
For methods of sharing segments, see the
pin-and-flags parameter.
Upon initial allocation of the segment:
•
The segment-size parameter is required if the swap file does not exist.
•
The segment-size parameter is optional if the swap file already exists. If the
segment is a read-only segment, the default size is the end-of-file value of the
swap file (EOF). If the segment is a read-write segment, the default segment
size is the allocated size of the swap file.
•
For a read-only segment, segment-size must not be greater than the end-of-
file value of the file; otherwise, an error occurs. For a read-write segment, if
segment-size is greater than the allocated size of the swap file, the system
attempts to allocate additional space.
If a segment is being shared by the PIN method (see
pin-and-flags), the
following rule applies to the sharers:
•
The segment-size parameter must be omitted and the size of the segment is
the same as that from the initial ALLOCATESEGMENT call.
If a segment is being shared by the file name method (see
pin-and-flags), the
following rules apply to the sharers: