This general macro changes the size of a block of storage allocated by a
MALOC or CALOC macro.
Use this macro to change the size of a block of storage allocated by a
MALOC or CALOC macro.
Format
- label
- A symbolic name can be assigned to the macro statement.
- BLOCK=Rx
- A general register (R0-R7, R14, or R15) containing the address of
the block of storage to be resized, or zero.
When coded from the control program (CP), only R0-R6 can be
used.
- SIZE=Ry
- A general register (R0-R7, R14, or R15) containing the number of
contiguous bytes of storage to which the block is to be resized.
When coded from the CP only R0-R6 can be used.
Entry Requirements
- Register 9 (R9) must contain the address of the ECB being
processed.
- The register specified by the BLOCK parameter must contain either the
value returned by a previous CALOC, MALOC or RALOC macro (or by the C language
function equivalents calloc, malloc or
realloc), or zero.
- When called from the CP, the caller must be in the ECB virtual memory
(EVM), in 31-bit addressing mode, R10 cannot be used as the base register, and
R9 must point to the ECB.
Return Conditions
Programming Considerations
- Any valid nonscratch register for an ECB-controlled program (R0-R7, R14,
or R15) can be used for BLOCK or SIZE.
- Any valid CP register (from R0-R6) can be used for the SIZE or BLOCK
parameters.
- When called from the CP, the contents of the ECB register save area
(CE1S0x) are not preserved; for example if SIZE=5, CE1S05 is not
preserved.
- See also the realloc C function and the CALOC, FREEC and MALOC
assembler macros for more information.
- In addition to the normal macro trace information the macro trace entry
will contain the size, in number of bytes, and address of the resized heap
memory.
Examples
None.