Guardian Procedure Calls Reference Manual
Indicates that the segment isBit field
Extensible.SEG_EXTENSIBLE_MASK <14>
Resident.SEG_RESIDENT_MASK <15>
Reserved Segment ID Values
The reserved segment ID values that can be returned by the segment-id parameter lie in the
range -109 through -2 (65427 through 65534). These values are used internally to identify various
types of segments allocated by the operating system, such as process stacks, global data, various
kinds of code, and certain special segments. For some kinds of segments (such as SRL or DLL code
or instance data), multiple segments in the process can have the same ID. Segment ID assignments
are subject to change from RVU to RVU; the individual values are not meaningful to typical callers
of ADDRESS_DELIMIT_. Current definitions can be found in these T9050 header files:
• DSEGIDH or DMEMH, beginning after identifier LAST_VALID_SSEDS_ID and ending before
identifier NULL_PST_SEGID. (This information moved from DMEMH to DSEGIDH as of the
H06.18 and J06.07 RVUs.)
• DMEM, beginning after identifier LAST^VALID^SSEDS^ID and ending before identifier
NULL^PST^SEGID.
These header files are distributed and optionally installed in the ZGUARD subvolume.
Considerations
• ADDRESS_DELIMIT_ is unaware of 64-bit segments and 64-bit global resident memory.
• The 64-bit address range includes sign-extended 32-bit addresses as a proper subset.
• An expanse is a consecutive address range reserved for a specific purpose, but not associated
with all the attributes of a segment. Expanses occur only in global 64-bit address space.
ADDRESS_DELIMIT64_ identifies an expanse by the special segment id EXPANSE_SEGID (-2).
• When the address parameter specifies a value outside any recognized address range,
ADDRESS_DELIMIT[64]_ returns result code 4 (ADDR_UNMAPPED) and assigns to
low-address and high-address the first and last addresses of an unrecognized range
containing address. The unrecognized area between two registered areas may be reported
as a single range or as a succession of consecutive ranges.
• For any output parameter to this procedure, supplying the parameter with the pointer address
set to %37777000000D (null address) is equivalent to not supplying the parameter.
Example
In the following example, the address of a local variable contained in the user data area is passed
to ADDRESS_DELIMIT_. The procedure returns the addresses of the first and last bytes of the user
data area. Note that the output addresses can be assigned either to a simple variable (LOW^ADDR)
or to a pointer variable (HIGH^ADDR). After a successful call to ADDRESS_DELIMIT_, HIGH^ADDR
designates the last byte of the user data area.
INT LOCAL^VARIABLE;
INT(32) LOW^ADDR;
STRING .EXT HIGH^ADDR;
INT ERROR,
ERROR^DETAIL;
.
.
.
ERROR := ADDRESS_DELIMIT_ ($XADR(LOCAL^VARIABLE),
LOW^ADDR,
@HIGH^ADDR,
! address^descriptor ! ,
52 Guardian Procedure Calls (A-B)