TAL Programmer's Guide

Using Extended Data Segments
Managing Addressing
096254 Tandem Computers Incorporated B–11
8. To manage large blocks of memory, call DEFINEPOOL, GETPOOL, and
PUTPOOL.
9. To determine the size of a segment, call SEGMENT_GETINFO_.
10. To access data in the automatic extended segment, call SEGMENT_USE_ and
restore the segment number that you saved at step 4.
11. To delete an explicit segment that you no longer need, call
SEGMENT_DEALLOCATE_.
For information on using these system procedures, see the Guardian Programmer's
Guide and the Guardian Procedure Calls Reference Manual.
If you do not restore the automatic extended segment before you manipulate data in it,
any of the following actions can result:
An assignment statement is beyond the segment’s memory limit and causes a trap.
All assignments within range occur in the hardware base and limit registers of the
automatic extended segment. Data in the currently active extended segment is
overwritten. The error is undetected until you discover the discrepancy at a later
time.
You get the wrong data from valid addresses in the explicit extended data
segment.
Storing the Base Address
The base address of the explicit extended segment defines the first storage location
that is available for allocating data.
When you call SEGMENT_ALLOCATE_, it returns the base address, as shown in the
following example.
D-Series Extended Segment Allocation Program
Example B-1 shows a D-series version of an extended segment allocation program.