update to v1.8.8

This commit is contained in:
Daan Leijen 2025-01-03 17:56:15 -08:00
parent a0a6ad3cf9
commit 98699c983a
36 changed files with 694 additions and 433 deletions

View file

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="generator" content="Doxygen 1.13.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mi-malloc: Aligned Allocation</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
@ -54,7 +54,7 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.11.0 -->
<!-- Generated by Doxygen 1.13.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
@ -109,11 +109,14 @@ $(function(){initNavTree('group__aligned.html',''); initResizable(true); });
<div class="headertitle"><div class="title">Aligned Allocation</div></div>
</div><!--header-->
<div class="contents">
<p>Allocating aligned memory blocks.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga69578ff1a98ca16e1dcd02c0995cd65c" id="r_ga69578ff1a98ca16e1dcd02c0995cd65c"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga69578ff1a98ca16e1dcd02c0995cd65c">mi_malloc_aligned</a> (size_t size, size_t alignment)</td></tr>
<tr class="memdesc:ga69578ff1a98ca16e1dcd02c0995cd65c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate <em>size</em> bytes aligned by <em>alignment</em>. <br /></td></tr>
<tr class="memdesc:ga69578ff1a98ca16e1dcd02c0995cd65c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate <em class="arg">size</em> bytes aligned by <em class="arg">alignment</em>. <br /></td></tr>
<tr class="separator:ga69578ff1a98ca16e1dcd02c0995cd65c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac7d0beb782f9b9ac31f47492b130f82" id="r_gaac7d0beb782f9b9ac31f47492b130f82"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gaac7d0beb782f9b9ac31f47492b130f82">mi_zalloc_aligned</a> (size_t size, size_t alignment)</td></tr>
<tr class="separator:gaac7d0beb782f9b9ac31f47492b130f82"><td class="memSeparator" colspan="2">&#160;</td></tr>
@ -122,7 +125,7 @@ Functions</h2></td></tr>
<tr class="memitem:ga5d7a46d054b4d7abe9d8d2474add2edf" id="r_ga5d7a46d054b4d7abe9d8d2474add2edf"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5d7a46d054b4d7abe9d8d2474add2edf">mi_realloc_aligned</a> (void *p, size_t newsize, size_t alignment)</td></tr>
<tr class="separator:ga5d7a46d054b4d7abe9d8d2474add2edf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2022f71b95a7cd6cce1b6e07752ae8ca" id="r_ga2022f71b95a7cd6cce1b6e07752ae8ca"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga2022f71b95a7cd6cce1b6e07752ae8ca">mi_malloc_aligned_at</a> (size_t size, size_t alignment, size_t offset)</td></tr>
<tr class="memdesc:ga2022f71b95a7cd6cce1b6e07752ae8ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate <em>size</em> bytes aligned by <em>alignment</em> at a specified <em>offset</em>. <br /></td></tr>
<tr class="memdesc:ga2022f71b95a7cd6cce1b6e07752ae8ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate <em class="arg">size</em> bytes aligned by <em class="arg">alignment</em> at a specified <em class="arg">offset</em>. <br /></td></tr>
<tr class="separator:ga2022f71b95a7cd6cce1b6e07752ae8ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7c1778805ce50ebbf02ccbd5e39d5dba" id="r_ga7c1778805ce50ebbf02ccbd5e39d5dba"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga7c1778805ce50ebbf02ccbd5e39d5dba">mi_zalloc_aligned_at</a> (size_t size, size_t alignment, size_t offset)</td></tr>
<tr class="separator:ga7c1778805ce50ebbf02ccbd5e39d5dba"><td class="memSeparator" colspan="2">&#160;</td></tr>
@ -132,7 +135,8 @@ Functions</h2></td></tr>
<tr class="separator:gad06dcf2bb8faadb2c8ea61ee5d24bbf6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Allocating aligned memory blocks. Note that <code>alignment</code> always follows <code>size</code> for consistency with the unaligned allocation API, but unfortunately this differs from <code>posix_memalign</code> and <code>aligned_alloc</code> in the C library. </p>
<p>Allocating aligned memory blocks. </p>
<p>Note that <code>alignment</code> always follows <code>size</code> for consistency with the unaligned allocation API, but unfortunately this differs from <code>posix_memalign</code> and <code>aligned_alloc</code> in the C library. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga424ef386fb1f9f8e0a86ab53f16eaaf1" name="ga424ef386fb1f9f8e0a86ab53f16eaaf1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga424ef386fb1f9f8e0a86ab53f16eaaf1">&#9670;&#160;</a></span>mi_calloc_aligned()</h2>
@ -210,16 +214,15 @@ Functions</h2></td></tr>
</table>
</div><div class="memdoc">
<p>Allocate <em>size</em> bytes aligned by <em>alignment</em>. </p>
<p>Allocate <em class="arg">size</em> bytes aligned by <em class="arg">alignment</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">size</td><td>number of bytes to allocate. </td></tr>
<tr><td class="paramname">alignment</td><td>the minimal alignment of the allocated memory. <br />
</td></tr>
<tr><td class="paramname">alignment</td><td>the minimal alignment of the allocated memory. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em>NULL</em> if out of memory, or if the alignment is not a power of 2 (including 0). The <em>size</em> is unrestricted (and does not have to be an integral multiple of the <em>alignment</em>). The returned pointer is aligned by <em>alignment</em>, i.e. <code>(uintptr_t)p % alignment == 0</code>. Returns a unique pointer if called with <em>size</em> 0.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em class="arg">NULL</em> if out of memory, or if the alignment is not a power of 2 (including 0). The <em class="arg">size</em> is unrestricted (and does not have to be an integral multiple of the <em class="arg">alignment</em>). The returned pointer is aligned by <em class="arg">alignment</em>, i.e. <code>(uintptr_t)p % alignment == 0</code>. Returns a unique pointer if called with <em class="arg">size</em> 0.</dd></dl>
<p>Note that <code>alignment</code> always follows <code>size</code> for consistency with the unaligned allocation API, but unfortunately this differs from <code>posix_memalign</code> and <code>aligned_alloc</code> in the C library.</p>
<dl class="section see"><dt>See also</dt><dd><a href="https://en.cppreference.com/w/c/memory/aligned_alloc">aligned_alloc</a> (in the standard C11 library, with switched arguments!) </dd>
<dd>
@ -257,16 +260,16 @@ Functions</h2></td></tr>
</table>
</div><div class="memdoc">
<p>Allocate <em>size</em> bytes aligned by <em>alignment</em> at a specified <em>offset</em>. </p>
<p>Allocate <em class="arg">size</em> bytes aligned by <em class="arg">alignment</em> at a specified <em class="arg">offset</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">size</td><td>number of bytes to allocate. </td></tr>
<tr><td class="paramname">alignment</td><td>the minimal alignment of the allocated memory at <em>offset</em>. </td></tr>
<tr><td class="paramname">alignment</td><td>the minimal alignment of the allocated memory at <em class="arg">offset</em>. </td></tr>
<tr><td class="paramname">offset</td><td>the offset that should be aligned. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em>NULL</em> if out of memory, or if the alignment is not a power of 2 (including 0). The <em>size</em> is unrestricted (and does not have to be an integral multiple of the <em>alignment</em>). The returned pointer is aligned by <em>alignment</em>, i.e. <code>(uintptr_t)p % alignment == 0</code>. Returns a unique pointer if called with <em>size</em> 0.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em class="arg">NULL</em> if out of memory, or if the alignment is not a power of 2 (including 0). The <em class="arg">size</em> is unrestricted (and does not have to be an integral multiple of the <em class="arg">alignment</em>). The returned pointer is aligned by <em class="arg">alignment</em>, i.e. <code>(uintptr_t)p % alignment == 0</code>. Returns a unique pointer if called with <em class="arg">size</em> 0.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/aligned-offset-malloc?view=vs-2017">_aligned_offset_malloc</a> (on Windows) </dd></dl>
</div>
@ -380,7 +383,7 @@ Functions</h2></td></tr>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
</ul>
</div>
</body>