Guardian Procedure Calls Reference Manual
limit larger than the flat address space. In native processes, the program globals and
the heap are allocated at the low-address end of the 32-bit flat-segment range, and
the heap grows upward; by default the system allocates other segments downward
from the high-address end. In addition to data segments allocated by
SEGMENT_ALLOCATE[64]_, the 32-bit flat segment area can also hold text and data
segments for DLLs as well as shared-memory segments attached by the OSS shmat()
function.
◦ For H06.24, J06.13, and later RVUs, 508 gigabytes (GB) of 64-bit address space
is also available for flat segments allocated or shared using SEGMENT_ALLOCATE64_.
This space is outside 32-bit address space and requires 64-bit addresses. Again, the
limit on a single segment is the largest contiguous address range not already
committed. Other segments can share this space, including, in a 64-bit OSS process,
the heap, as well as shared-memory segments attached by the shmat() function.
Note that 508 GB is an address space limit, not a practical limit on memory utilization.
A user segment also requires backing storage on disk, so the Kernel Managed Swap
Facility must be configured with large enough files, or the segments must be individually
file-backed (see parameters filename and segment-type). Furthermore, the system
generally does not perform well if the aggregate use of virtual memory significantly
exceeds the physical memory capacity of the processor. Therefore, the practical limit
on segment size and number is typically much less than 508 GB.
◦ The 32-megabyte boundary does not apply in the G05.00 and later G-series RVUs,
or H-series or J-series RVUs.
◦ 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).
• 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 native process.
For methods of sharing segments, see the pin and segment-type parameters.
Upon initial creation 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.
SEGMENT_ALLOCATE[64]_ Procedures 1261