ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/CEECZST.htm

238 lines
6.7 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>Reallocate Storage (CEECZST) API</title>
<!-- Begin Header Records ========================================== --><!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- ILE8A SCRIPT A converted by B2H R4.1 (346) (CMS) by NLJONES at -->
<!-- RCHVMX on 25 Feb 1999 at 15:15:15 -->
<!-- Edited by Kersten Oct 2001 -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!--Java sync-link-->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<a name="Top_Of_Page"></a>
<h2>Reallocate Storage (CEECZST) API</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Required Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="30%">address</td>
<td align="left" valign="top" width="30%">I/O</td>
<td align="left" valign="top" width="30%">POINTER</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">new_size</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">INT4</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Omissible Parameter:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">3</td>
<td align="left" valign="top" width="30%">fc</td>
<td align="left" valign="top" width="30%">Output</td>
<td align="left" valign="top" width="30%">FEEDBACK</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Service Program Name: QLEAWI<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Reallocate Storage (CEECZST) API changes the size of a previously
allocated storage block, preserving the contents.</p>
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
<!-- Instead, use the commented out coding below to indicate NONE. -->
<h3>Authorities and Locks</h3>
<!-- Use this if there are no authorities and locks. -->
<p>None.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>address (I/O)</strong></dt>
<dd>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.
<p>In effect, reallocation of a storage block is accomplished by allocating a
new storage block, of size <em>new_size</em>, and copying the contents of the
old block to the new block.</p>
</dd>
<dt><strong>new_size (input)</strong></dt>
<dd>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.</dd>
</dl>
<br>
<h3>Omissible Parameter</h3>
<dl>
<dt><strong>fc (output)</strong></dt>
<dd>A 12-byte feedback code.</dd>
</dl>
<br>
<h3>Feedback Codes and Conditions</h3>
<p>A message severity of 10 or less represents success. If the severity is
greater than 10:</p>
<ul>
<li>No storage is allocated.</li>
<li>The previous allocation remains intact.</li>
<li>The value in <em>address</em> remains unchanged.</li>
</ul>
<br>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top">CEE0000</td>
<td align="left" valign="top">The API completed successfully</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 00</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">CEE0802</td>
<td align="left" valign="top">The storage headers are damaged</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 40</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">CEE0808</td>
<td align="left" valign="top">Requested storage size is not valid</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 30</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">CEE0810</td>
<td align="left" valign="top">The starting address for reallocation is not
valid</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 30</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">CEE0813</td>
<td align="left" valign="top">Insufficient storage available to satisfy the
request</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 30</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
</table>
<br>
<h3>Usage Notes</h3>
<ul>
<li>The heap identifier is inferred from the address. The new storage block is
allocated from the same heap that contained the old block. The reallocate
operation may be issued from an activation group other than the one that owns
the heap.</li>
<li>The contents of the old storage block are preserved in the following way:
<ul>
<li>If <em>new_size</em> is greater than the old size, the entire contents of
the old storage block are copied to the new block.</li>
<li>If <em>new_size</em> is less than the old size, the contents of the old
block are truncated to the size of the new block.</li>
<li>If <em>new_size</em> is equal to the old size, the contents of the old
storage block are copied to the new block.</li>
</ul>
<p><strong>Note:</strong> Because the new storage may be allocated at a
different location than the existing allocation, any pointers that referred to
the old storage are no longer valid. Continued use of such pointers will give
unpredictable, or incorrect results.</p>
</li>
<li>Storage that is reallocated maintains the same mark and release status as
the old storage block. If the old storage block was marked, the new storage
block carries the same mark and is released by a release operation that
specifies the mark.</li>
</ul>
<br>
<hr>
API introduced: V2R3
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"ile1a1.htm">ILE CEE APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>