Reallocate Storage (CEECZST) API


  Required Parameter Group:

1 address I/O POINTER
2 new_size Input INT4

  Omissible Parameter:

3 fc Output FEEDBACK

  Service Program Name: QLEAWI

  Default Public Authority: *USE

  Threadsafe: Yes

The Reallocate Storage (CEECZST) API changes the size of a previously allocated storage block, preserving the contents.

Authorities and Locks

None.


Required Parameter Group

address (I/O)
On input, this parameter contains an address returned by a previous CEEGTST call or a language intrinsic function. On output, the address of the first byte of the newly allocated storage is returned in this parameter.

In effect, reallocation of a storage block is accomplished by allocating a new storage block, of size new_size, and copying the contents of the old block to the new block.

new_size (input)
The number of bytes of storage to be allocated for the new storage block. This value is rounded up to a multiple of the minimum boundary specified when the heap was created. The minimum boundary for the activation group default heap is 16 bytes.

Omissible Parameter

fc (output)
A 12-byte feedback code.

Feedback Codes and Conditions

A message severity of 10 or less represents success. If the severity is greater than 10:


CEE0000 The API completed successfully
Severity: 00  
CEE0802 The storage headers are damaged
Severity: 40  
CEE0808 Requested storage size is not valid
Severity: 30  
CEE0810 The starting address for reallocation is not valid
Severity: 30  
CEE0813 Insufficient storage available to satisfy the request
Severity: 30  

Usage Notes



API introduced: V2R3

[ Back to top | ILE CEE APIs | APIs by category ]