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: C++ wrappers</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');
@ -110,11 +110,14 @@ $(function(){initNavTree('group__cpp.html',''); initResizable(true); });
<div class="headertitle"><div class="title">C++ wrappers</div></div>
</div><!--header-->
<div class="contents">
<p><code>mi_</code> prefixed implementations of various allocation functions that use C++ semantics on out-of-memory, generally calling <code>std::get_new_handler</code> and raising a <code>std::bad_alloc</code> exception on failure.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structmi__stl__allocator" id="r_structmi__stl__allocator"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#structmi__stl__allocator">mi_stl_allocator&lt; T &gt;</a></td></tr>
<tr class="memdesc:structmi__stl__allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight"><em>std::allocator</em> implementation for mimalloc for use in STL containers. <a href="#structmi__stl__allocator">More...</a><br /></td></tr>
<tr class="memdesc:structmi__stl__allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight"><em class="arg">std::allocator</em> implementation for mimalloc for use in STL containers. <a href="#structmi__stl__allocator">More...</a><br /></td></tr>
<tr class="separator:structmi__stl__allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
@ -129,10 +132,10 @@ Functions</h2></td></tr>
<tr class="memdesc:ga79c54da0b4b4ce9fcc11d2f6ef6675f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">like <a class="el" href="group__aligned.html#ga69578ff1a98ca16e1dcd02c0995cd65c" title="Allocate size bytes aligned by alignment.">mi_malloc_aligned()</a>, but when out of memory, use <code>std::get_new_handler</code> and raise <code>std::bad_alloc</code> exception on failure. <br /></td></tr>
<tr class="separator:ga79c54da0b4b4ce9fcc11d2f6ef6675f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5cb4f120d1f7296074256215aa9a9e54" id="r_ga5cb4f120d1f7296074256215aa9a9e54"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5cb4f120d1f7296074256215aa9a9e54">mi_new_nothrow</a> (size_t n)</td></tr>
<tr class="memdesc:ga5cb4f120d1f7296074256215aa9a9e54"><td class="mdescLeft">&#160;</td><td class="mdescRight">like <code>mi_malloc</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em>NULL</em> on failure. <br /></td></tr>
<tr class="memdesc:ga5cb4f120d1f7296074256215aa9a9e54"><td class="mdescLeft">&#160;</td><td class="mdescRight">like <code>mi_malloc</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em class="arg">NULL</em> on failure. <br /></td></tr>
<tr class="separator:ga5cb4f120d1f7296074256215aa9a9e54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga92ae00b6dd64406c7e64557711ec04b7" id="r_ga92ae00b6dd64406c7e64557711ec04b7"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga92ae00b6dd64406c7e64557711ec04b7">mi_new_aligned_nothrow</a> (size_t n, size_t alignment)</td></tr>
<tr class="memdesc:ga92ae00b6dd64406c7e64557711ec04b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">like <code>mi_malloc_aligned</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em>NULL</em> on failure. <br /></td></tr>
<tr class="memdesc:ga92ae00b6dd64406c7e64557711ec04b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">like <code>mi_malloc_aligned</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em class="arg">NULL</em> on failure. <br /></td></tr>
<tr class="separator:ga92ae00b6dd64406c7e64557711ec04b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6867d89baf992728e0cc20a1f47db4d0" id="r_ga6867d89baf992728e0cc20a1f47db4d0"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga6867d89baf992728e0cc20a1f47db4d0">mi_new_realloc</a> (void *p, size_t newsize)</td></tr>
<tr class="memdesc:ga6867d89baf992728e0cc20a1f47db4d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">like <a class="el" href="group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583" title="Re-allocate memory to newsize bytes.">mi_realloc()</a>, but when out of memory, use <code>std::get_new_handler</code> and raise <code>std::bad_alloc</code> exception on failure. <br /></td></tr>
@ -142,8 +145,8 @@ Functions</h2></td></tr>
<tr class="separator:gaace912ce086682d56f3ce9f7638d9d67"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p><code>mi_</code> prefixed implementations of various allocation functions that use C++ semantics on out-of-memory, generally calling <code>std::get_new_handler</code> and raising a <code>std::bad_alloc</code> exception on failure.</p>
<p>Note: use the <code>mimalloc-new-delete.h</code> header to override the <em>new</em> and <em>delete</em> operators globally. The wrappers here are mostly for convenience for library writers that need to interface with mimalloc from C++. </p>
<p><code>mi_</code> prefixed implementations of various allocation functions that use C++ semantics on out-of-memory, generally calling <code>std::get_new_handler</code> and raising a <code>std::bad_alloc</code> exception on failure. </p>
<p>Note: use the <code>mimalloc-new-delete.h</code> header to override the <em class="arg">new</em> and <em class="arg">delete</em> operators globally. The wrappers here are mostly for convenience for library writers that need to interface with mimalloc from C++. </p>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structmi__stl__allocator" id="structmi__stl__allocator"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structmi__stl__allocator">&#9670;&#160;</a></span>mi_stl_allocator</h2>
@ -157,7 +160,7 @@ Functions</h2></td></tr>
</table>
</div><div class="memdoc">
<div class="textblock"><div class="compoundTemplParams">template&lt;class T&gt;<br />
struct mi_stl_allocator&lt; T &gt;</div><p><em>std::allocator</em> implementation for mimalloc for use in STL containers. </p>
struct mi_stl_allocator&lt; T &gt;</div><p><em class="arg">std::allocator</em> implementation for mimalloc for use in STL containers. </p>
<p>For example: </p><div class="fragment"><div class="line">std::vector&lt;int, mi_stl_allocator&lt;int&gt; &gt; vec;</div>
<div class="line">vec.push_back(1);</div>
<div class="line">vec.pop_back();</div>
@ -226,7 +229,7 @@ struct mi_stl_allocator&lt; T &gt;</div><p><em>std::allocator</em> implementatio
</table>
</div><div class="memdoc">
<p>like <code>mi_malloc_aligned</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em>NULL</em> on failure. </p>
<p>like <code>mi_malloc_aligned</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em class="arg">NULL</em> on failure. </p>
</div>
</div>
@ -268,7 +271,7 @@ struct mi_stl_allocator&lt; T &gt;</div><p><em>std::allocator</em> implementatio
</table>
</div><div class="memdoc">
<p>like <code>mi_malloc</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em>NULL</em> on failure. </p>
<p>like <code>mi_malloc</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em class="arg">NULL</em> on failure. </p>
</div>
</div>
@ -328,7 +331,7 @@ struct mi_stl_allocator&lt; T &gt;</div><p><em>std::allocator</em> implementatio
<!-- 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>