Guardian Programmer's Guide

Table Of Contents
Managing Memory
Guardian Programmer’s Guide 421922-014
17 - 17
Overview of Selectable Segments
extended data segments. There are two types of extended data segments: flat
segments and selectable segments. A flat segment can be any size up to 128
megabytes on G04.00 and all earlier G-series releases and all D-series releases; a
selectable segment can be any size up to 127.5 megabytes on G04.00 and all earlier
G-series releases and all D-series releases. A flat segment or a selectable segment
can be up to 1120 megabytes on G05.00 and all subsequent G-series releases and
1536 megabytes on TNS/E. TNS and native processes can allocate both types of
segments.
Throughout the remainder of this section, whenever a reference is made to an
extended data segment, the information applies to both selectable segments and flat
segments.
This subsection describes how to access extended data segments using Guardian
procedures. It describes how to perform the following operations:
Allocate an extended data segment using the SEGMENT_ALLOCATE_ procedure.
Establish the current selectable segment using the SEGMENT_USE_ procedure.
Determine the base address of a flat segment using the SEGMENT_USE_
procedure.
Force a flat segment to be allocated at a specific address using the
SEGMENT_ALLOCATE_ procedure.
Pass data in an extended data segment to procedures that accept extended
pointers, such as the READX and WRITEX procedures.
Move data between selectable data segments using the MOVEX procedure.
Move data between flat segments using assignment statements.
Determine the size of an extended data segment using the SEGMENT_GETINFO_
procedure.
Deallocate an extended data segment using the SEGMENT_DEALLOCATE_
procedure.
Share an extended data segment.
Overview of Selectable Segments
You can allocate space for multiple selectable segments; however, at most, one
selectable segment is accessible at a time. It is called the current selectable segment.
A selectable segment starts at an address that is returned by the
SEGMENT_ALLOCATE_ procedure. This address is %2000000 (%h00080000), and
is the same for all selectable segments. Note that the selectable segment is not
contiguous with the user data segment.
Figure 17-5 shows the location of selectable segments relative to the user data
segment and main stack segment.