Use this system macro to obtain contiguous storage for the ISO-C stack in
the stack area of entry control block (ECB) virtual memory (EVM)
Format
- label
- A symbolic name can be assigned to the macro statement.
- STORAGE=Rw
- This parameter specifies the number of contiguous 4 K byte pages to be
allocated. The general register used must be R0-R7, R14,
R15.
- SAVREG
- The specified volatile registers will be saved by the macro in
the stack area or in the registers specified by the WKREG parameter. Up
to 3 registers can be specified. Those registers are R0, R1, R2.
If this keyword is omitted, none of the 3 registers will be saved. You
should not save a volatile register if you expect it to contain an output
parameter. The register will be overwritten with its original contents,
since the reload is the last thing performed by the macro.
- WKREG
- The specified symbolic register names are free to be used by the macro to
save the volatile registers coded on the SAVREG parameter.
Up to 3 registers can be specified, but the standard linkage registers R13
through R2 cannot be used here. This parameter is used in conjunction
with the SAVREG parameter to generate efficient code and enhance the
performance of the macro. The number of registers specified by WKREG
should be less than or equal to the number of registers specified by
SAVREG. If this parameter is omitted or not used to its maximum
capacity, code optimization is sacrificed.
Entry Requirements
- This macro is for use in the control program (CP) only while running with
protection key 0 and in supervisor state.
- This macro must be used to acquire ISO-C stack storage only. If
used for acquiring storage for any other purpose, results cannot be
predicted.
- R9 must point at the ECB that will use the contiguous storage.
- This macro can be run from either EVM or from SVM.
Return Conditions
- When this macro completes, if there is enough virtual storage available,
the register specified as the STORAGE parameter contains the address of the
start of the allocated storage.
- Note:
- The storage acquired is allocated in the EVM as part of the ISO-C stack
heap. It can be located above 16 MB. The address returned is
valid in 31-bit addressing mode only.
- If the maximum amount of storage allowed for the ECB would have been
exceeded by satisfying the request, a system error with exit occurs.
- When main storage blocks are used up, a catastrophic system error occurs,
because insufficient real storage exists to satisfy the request.
Control is not returned.
Programming Considerations
- This macro can be run on any I-stream, however it must be processed from
the same I-stream given in the CE1ISN field in the associated ECB.
- This macro is restricted to CP use only and is used only by ISO-C code to
acquire initial stack allocation (ISA) storage or to extend the stack size
through the stack overflow routine. Use of this macro to acquire
storage for other than the ISO-C stack can corrupt the ISO-C stack.
- $GTSTC storage is not contiguous in the SVM.
- Storage acquired using the $GTSTC macro is automatically returned when the
ECB exits.
Examples
None.