Guardian Application Conversion Guide

Converting Memory-Management Procedure Calls
Converting Other Parts of an Application
8–38 096047 Tandem Computers Incorporated
error := SEGMENT_USE_ (segment^id,
old^segment^id,
! base^address ! ,
error^detail);
Deallocating an Extended
Data Segment
Your existing program might call the DEALLOCATESEGMENT procedure to
deallocate an extended data segment:
CALL DEALLOCATESEGMENT (segment^id);
Convert your program to call the SEGMENT_DEALLOCATE_ procedure. The
flags
integer parameter specifies whether dirty pages are written to the swap file. (A dirty
page is a page in memory that has been updated but not written to the swap file.) The
flags
.<0:14> bits must be zero;
flags
.<15> can be:
0 Dirty pages are written to the swap file (the default action).
1 Dirty pages are not written to the swap file.
In this example, SEGMENT_DEALLOCATE_ deallocates the extended data segment
identified by
segment^id
. The procedure uses the default
flags
value:
error := SEGMENT_DEALLOCATE_(segment^id,
! flags ! ,
error^detail);
To deallocate an extended data segment for a backup process, call the
SEGMENT_DEALLOCATE_CHKPT_ procedure from the primary process. This
procedure supersedes the CHECKDEALLOCATESEGMENT procedure.
Getting Information About
an Extended Data Segment
Your existing program might call the SEGMENTSIZE procedure to get information
about a currently allocated extended data segment:
segment^size := SEGMENTSIZE (segment^id);
Convert your program to call the SEGMENT_GETINFO_ procedure, which returns
this information:
The size of the segment in bytes
The swap file name associated with the segment
The length in bytes of the swap file name
The base address of the segment
In this example, SEGMENT_GETINFO_ returns information about the extended data
segment identified by
segment^id
:
error := SEGMENT_GETINFO_(segment^id,
segment^size,
swap^file^name:max^length,
swap^file^length,
error^detail,
base^address);