<trclass="memdesc:ga97fedb4f7107c592fd7f0f0a8949a57d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Allocate zero-initialized <em>count</em> elements of <em>size</em> bytes. <ahref="group__malloc.html#ga97fedb4f7107c592fd7f0f0a8949a57d">More...</a><br/></td></tr>
<trclass="memdesc:ga23a0fbb452b5dce8e31fab1a1958cacc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Re-allocate memory to <em>count</em> elements of <em>size</em> bytes, with extra memory initialized to zero. <ahref="group__malloc.html#ga23a0fbb452b5dce8e31fab1a1958cacc">More...</a><br/></td></tr>
<trclass="memdesc:gaaee66a1d483c3e28f585525fb96707e4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Try to re-allocate memory to <em>newsize</em> bytes <em>in place</em>. <ahref="group__malloc.html#gaaee66a1d483c3e28f585525fb96707e4">More...</a><br/></td></tr>
<trclass="memdesc:ga0b05e2bf0f73e7401ae08597ff782ac6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Allocate <em>count</em> elements of <em>size</em> bytes. <ahref="group__malloc.html#ga0b05e2bf0f73e7401ae08597ff782ac6">More...</a><br/></td></tr>
<trclass="memdesc:ga61d57b4144ba24fba5c1e9b956d13853"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Re-allocate memory to <em>count</em> elements of <em>size</em> bytes. <ahref="group__malloc.html#ga61d57b4144ba24fba5c1e9b956d13853">More...</a><br/></td></tr>
<trclass="memdesc:gac7cffe13f1f458ed16789488bf92b9b2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Allocate and duplicate a string. <ahref="group__malloc.html#gac7cffe13f1f458ed16789488bf92b9b2">More...</a><br/></td></tr>
<trclass="memdesc:gaaabf971c2571891433477e2d21a35266"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Allocate and duplicate a string up to <em>n</em> bytes. <ahref="group__malloc.html#gaaabf971c2571891433477e2d21a35266">More...</a><br/></td></tr>
<p>Allocate zero-initialized <em>count</em> elements of <em>size</em> bytes. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">count</td><td>number of elements. </td></tr>
<tr><tdclass="paramname">size</td><td>size of each element. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>pointer to the allocated memory of <em>size*<em>count</em> bytes</em>, or <em>NULL</em> if either out of memory or when <code>count*size</code> overflows.</dd></dl>
<p>Returns a unique pointer if called with either <em>size</em> or <em>count</em> of 0. </p><dlclass="section see"><dt>See also</dt><dd><aclass="el"href="group__malloc.html#gafdd9d8bb2986e668ba9884f28af38000"title="Allocate zero-initialized size bytes.">mi_zalloc()</a></dd></dl>
<p>Try to re-allocate memory to <em>newsize</em> bytes <em>in place</em>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">p</td><td>pointer to previously allocated memory (or <em>NULL</em>). </td></tr>
<tr><tdclass="paramname">newsize</td><td>the new required size in bytes. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>pointer to the re-allocated memory of <em>newsize</em> bytes (always equal to <em>p</em>), or <em>NULL</em> if either out of memory or if the memory could not be expanded in place. If <em>NULL</em> is returned, the pointer <em>p</em> is not freed. Otherwise the original pointer is returned as the reallocated result since it fits in-place with the new size. If <em>newsize</em> is larger than the original <em>size</em> allocated for <em>p</em>, the bytes after <em>size</em> are uninitialized. </dd></dl>
<tr><tdclass="paramname">size</td><td>number of bytes to allocate. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em>NULL</em> if out of memory. Returns a unique pointer if called with <em>size</em> 0. </dd></dl>
<p>Allocate <em>count</em> elements of <em>size</em> bytes. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">count</td><td>The number of elements. </td></tr>
<tr><tdclass="paramname">size</td><td>The size of each element. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A pointer to a block of <em>count</em> * <em>size</em> bytes, or <em>NULL</em> if out of memory or if <em>count</em> * <em>size</em> overflows.</dd></dl>
<p>If there is no overflow, it behaves exactly like <code>mi_malloc(p,count*size)</code>. </p><dlclass="section see"><dt>See also</dt><dd><aclass="el"href="group__malloc.html#ga97fedb4f7107c592fd7f0f0a8949a57d"title="Allocate zero-initialized count elements of size bytes.">mi_calloc()</a></dd>
<p>Re-allocate memory to <em>newsize</em> bytes. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">p</td><td>pointer to previously allocated memory (or <em>NULL</em>). </td></tr>
<tr><tdclass="paramname">newsize</td><td>the new required size in bytes. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>pointer to the re-allocated memory of <em>newsize</em> bytes, or <em>NULL</em> if out of memory. If <em>NULL</em> is returned, the pointer <em>p</em> is not freed. Otherwise the original pointer is either freed or returned as the reallocated result (in case it fits in-place with the new size). If the pointer <em>p</em> is <em>NULL</em>, it behaves as <em>mi_malloc</em>(<em>newsize</em>). If <em>newsize</em> is larger than the original <em>size</em> allocated for <em>p</em>, the bytes after <em>size</em> are uninitialized. </dd></dl>
<p>Re-allocate memory to <em>newsize</em> bytes,. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">p</td><td>pointer to previously allocated memory (or <em>NULL</em>). </td></tr>
<tr><tdclass="paramname">newsize</td><td>the new required size in bytes. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>pointer to the re-allocated memory of <em>newsize</em> bytes, or <em>NULL</em> if out of memory.</dd></dl>
<p>In contrast to <aclass="el"href="group__malloc.html#gaf11eb497da57bdfb2de65eb191c69db6"title="Re-allocate memory to newsize bytes.">mi_realloc()</a>, if <em>NULL</em> is returned, the original pointer <em>p</em> is freed (if it was not <em>NULL</em> itself). Otherwise the original pointer is either freed or returned as the reallocated result (in case it fits in-place with the new size). If the pointer <em>p</em> is <em>NULL</em>, it behaves as <em>mi_malloc</em>(<em>newsize</em>). If <em>newsize</em> is larger than the original <em>size</em> allocated for <em>p</em>, the bytes after <em>size</em> are uninitialized.</p>
<p>Re-allocate memory to <em>count</em> elements of <em>size</em> bytes. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">p</td><td>Pointer to a previously allocated block (or <em>NULL</em>). </td></tr>
<tr><tdclass="paramname">count</td><td>The number of elements. </td></tr>
<tr><tdclass="paramname">size</td><td>The size of each element. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A pointer to a re-allocated block of <em>count</em> * <em>size</em> bytes, or <em>NULL</em> if out of memory or if <em>count</em> * <em>size</em> overflows.</dd></dl>
<p>If there is no overflow, it behaves exactly like <code>mi_realloc(p,count*size)</code>. </p><dlclass="section see"><dt>See also</dt><dd><ahref="http://man.openbsd.org/reallocarray">reallocarray()</a> (on BSD) </dd></dl>
<tr><tdclass="paramname">resolved_name</td><td>Should be <em>NULL</em> (but can also point to a buffer of at least <em>PATH_MAX</em> bytes). </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>If successful a pointer to the resolved absolute file name, or <em>NULL</em> on failure (with <em>errno</em> set to the error code).</dd></dl>
<p>If <em>resolved_name</em> was <em>NULL</em>, the returned result should be freed with <aclass="el"href="group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95"title="Free previously allocated memory.">mi_free()</a>.</p>
<p>Replacement for the standard <ahref="http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html">realpath()</a> such that <aclass="el"href="group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95"title="Free previously allocated memory.">mi_free()</a> can be used on the returned result (if <em>resolved_name</em> was <em>NULL</em>). </p>
<p>Re-allocate memory to <em>count</em> elements of <em>size</em> bytes, with extra memory initialized to zero. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">p</td><td>Pointer to a previously allocated block (or <em>NULL</em>). </td></tr>
<tr><tdclass="paramname">count</td><td>The number of elements. </td></tr>
<tr><tdclass="paramname">size</td><td>The size of each element. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A pointer to a re-allocated block of <em>count</em> * <em>size</em> bytes, or <em>NULL</em> if out of memory or if <em>count</em> * <em>size</em> overflows.</dd></dl>
<p>If there is no overflow, it behaves exactly like <code>mi_rezalloc(p,count*size)</code>. </p><dlclass="section see"><dt>See also</dt><dd><aclass="el"href="group__malloc.html#ga61d57b4144ba24fba5c1e9b956d13853"title="Re-allocate memory to count elements of size bytes.">mi_reallocn()</a></dd>
<tr><tdclass="paramname">s</td><td>string to duplicate (or <em>NULL</em>). </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>a pointer to newly allocated memory initialized to string <em>s</em>, or <em>NULL</em> if either out of memory or if <em>s</em> is <em>NULL</em>.</dd></dl>
<p>Replacement for the standard <ahref="http://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html">strdup()</a> such that <aclass="el"href="group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95"title="Free previously allocated memory.">mi_free()</a> can be used on the returned result. </p>
<p>Allocate and duplicate a string up to <em>n</em> bytes. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">s</td><td>string to duplicate (or <em>NULL</em>). </td></tr>
<tr><tdclass="paramname">n</td><td>maximum number of bytes to copy (excluding the terminating zero). </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>a pointer to newly allocated memory initialized to string <em>s</em> up to the first <em>n</em> bytes (and always zero terminated), or <em>NULL</em> if either out of memory or if <em>s</em> is <em>NULL</em>.</dd></dl>
<p>Replacement for the standard <ahref="http://pubs.opengroup.org/onlinepubs/9699919799/functions/strndup.html">strndup()</a> such that <aclass="el"href="group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95"title="Free previously allocated memory.">mi_free()</a> can be used on the returned result. </p>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.1 </li>