This general macro obtains a variable-sized, doubleword-aligned block from
heap-resident storage and initializes it.
Format
- label
- A symbolic name can be assigned to the macro statement.
- COUNT=reg1
- A general register (R0-R7, R14, or R15) or a register equate containing
the number of elements to be allocated.
- ESIZE=reg2
- A general register (R0-R7, R14, or R15) or equate containing the size of
each element to be allocated.
Entry Requirements
None.
Return Conditions
- The register specified by COUNT contains the address of the start of the
allocated storage. This storage is guaranteed to be doubleword aligned
and initialized to hex zeros.
- Note:
- The storage is allocated in the EVM as part of the total ECB-unique storage
area available to the ECB. It is located above the 16-megabyte
boundary. The address returned is valid in 31-bit addressing mode
only.
- The contents of the register specified by ESIZE are unaltered.
- The register specified for COUNT contains X'00000000' upon
return if:
- COUNT or ESIZE is zero.
- The heap does not contain enough storage to satisfy the request for
allocation, and the heap cannot be further extended.
- The contents of R14 and R15 are unknown. All other registers are
preserved, except for any used for the COUNT parameter.
- Control is returned to the NSI if no heap corruption is detected.
- When main storage blocks are exhausted, a catastrophic system error
results, since insufficient real storage exists to satisfy the request.
Control is not returned.
- Control is not returned if corruption is detected in the
heap. An error occurs and the ECB exits immediately. See Messages (System Error and Offline) and Messages (Online) for more details about this
error.
Programming Considerations
- Any valid register for an ECB-controlled program (R0-R7, R14, or R15) can
be used for BLOCK or ESIZE.
- The amount of heap-resident storage available for use as ECB-unique
storage is determined during installation. Check with the responsible
party if the maximum is in doubt. This limit applies to the sum total
of allocation requests issued by the ECB, not just to any single
request.
- In addition to the normal macro trace information the macro trace entry
will contain the size, in number of bytes, and address of the allocated
storage.
Examples
None.