gtps1m4qSystem Macros

RSYSC-Release System Heap Storage

Use this system macro to return frames to the TPF system that were allocated to the system heap by the $GSYSC or GSYSC macros.

See $GSYSC-Get System Heap Storage and GSYSC-Get System Heap Storage for more information about the $GSYSC and GSYSC macros, respectively.

Format




label
A symbolic name may be assigned to the macro statement.

ADDRESS=Rx
The ADDRESS parameter specifies the register containing the starting address of the storage being returned. This address must be:

The general register used must be R0 through R12, R14, or R15.

FRAMES=Ry
The FRAMES parameter specifies the number of 4 KB frames to be returned to the TPF system. The number of frames requested for release must be the same number of frames requested on the $GSYSC or GSYSC macro. The general register used must be R0 through R7, R14, or R15.

TOKEN=Rz
The TOKEN parameter specifies the address of an 8-character string that the TPF system uses to identify the allocated storage. This string must match the string specified on the $GSYSC or GSYSC macro. The general register used must be R0 through R7, R14, or R15.

Entry Requirements

Return Conditions

Programming Considerations

Examples

Return system storage allocated for use as MY_TABLE.

         ITUUTL REG1=R14              CONNECT WITH TABLE UPDATE DSECT
         LA    R14,ITULEN             GET THE LENGTH OF A BLOCK
         LA    R14,4095(R14)          ROUND TO THE NEXT 4 KB
         LR    R7,R14                 SAVE NUMBER OF FRAMES
         SRL   R14,12                 DETERMINE NUMBER OF 4 KB FRAMES
         LA    R6,MY_TABLE
         GSYSC FRAMES=R14,TOKEN=R6    ALLOCATE THE STORAGE
         LTR   R14,R14                CHECK THE RETURN CODE
         BNZ   HAVE_STORAGE           CONTINUE PROCESSING
          .
          .
     process error for no storage
          .
          .
HAVE_STORAGE     DS  0H
          .
          .
     routine that uses the storage
          .
          .
RELEASE_STORAGE  DS  0H
         LA    R6,MY_TABLE
         RSYSC ADDRESS=R14,FRAMES=R7,TOKEN=R6   RELEASE THE STORAGE
         LTR   R15,R15                      CHECK THE RETURN CODE
         BNZ   RELEASE_ERROR                BRANCH TO PROCESS ERROR
          .
          .
          .
          .
MY_TABLE  DC   CL8'MY_TABLE'