CEEV#GTS — get heap storage

The CEEV#GTS CWI allocates heap storage from a user-specified heap.

Syntax

void (ceev#gts)

CEEV#GTS
Call this CWI interface as follows:
L    R12,A(CAA)
L    R15,CEECAACELV-CEECAA(,R12)
L    R15,124(,R15)
BALR R14,R15
Parameters are passed to CEEV#GTS in registers:
R1
(Input) Heapid (0 for user heap)
R1
(Output) Address of storage obtained
R2
(Input) Number of bytes of storage to obtain
Usage Notes:
  1. Storage below the 16 MB line is always returned under the following conditions:
    • The caller is in AMODE 24
    • HEAP(,,BELOW) is in effect
    • The ensm_below16m_flag is set

    Storage above the 16 MB line will only be returned if the caller is in AMODE 31 and HEAP(,,ANY) is in effect.

    The caller's AMODE is determined by the high order bit of R14.
    0
    AMODE 24
    1
    AMODE 31
  2. The caller must test for errors. When an error occurs, R15 will be nonzero. The caller must either handle the error or build a 96-bit feedback token and signal it.
  3. The conditions that can result from this service are the same as the conditions from the CEEGTST AWI.
  4. The heapid (R1 on input) must be 0 (for the user heap) or a value returned from the CEECRHP AWI callable service.