914 lines
53 KiB
HTML
914 lines
53 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<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="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>mi-malloc: Heap Allocation</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { init_search(); });
|
|
/* @license-end */
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="mimalloc-doxygen.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
|
|
<td id="projectalign">
|
|
<div id="projectname">mi-malloc<span id="projectnumber"> 1.8/2.1</span>
|
|
</div>
|
|
</td>
|
|
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
|
|
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.11.0 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(0); });
|
|
/* @license-end */
|
|
</script>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function(){initNavTree('group__heap.html',''); initResizable(true); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#typedef-members">Typedefs</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle"><div class="title">Heap Allocation</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
|
Typedefs</h2></td></tr>
|
|
<tr class="memitem:ga34a47cde5a5b38c29f1aa3c5e76943c2" id="r_ga34a47cde5a5b38c29f1aa3c5e76943c2"><td class="memItemLeft" align="right" valign="top">typedef struct mi_heap_s </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a></td></tr>
|
|
<tr class="memdesc:ga34a47cde5a5b38c29f1aa3c5e76943c2"><td class="mdescLeft"> </td><td class="mdescRight">Type of first-class heaps. <br /></td></tr>
|
|
<tr class="separator:ga34a47cde5a5b38c29f1aa3c5e76943c2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><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:gaa718bb226ec0546ba6d1b6cb32179f3a" id="r_gaa718bb226ec0546ba6d1b6cb32179f3a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaa718bb226ec0546ba6d1b6cb32179f3a">mi_heap_new</a> ()</td></tr>
|
|
<tr class="memdesc:gaa718bb226ec0546ba6d1b6cb32179f3a"><td class="mdescLeft"> </td><td class="mdescRight">Create a new heap that can be used for allocation. <br /></td></tr>
|
|
<tr class="separator:gaa718bb226ec0546ba6d1b6cb32179f3a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga2ab1af8d438819b55319c7ef51d1e409" id="r_ga2ab1af8d438819b55319c7ef51d1e409"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga2ab1af8d438819b55319c7ef51d1e409">mi_heap_delete</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap)</td></tr>
|
|
<tr class="memdesc:ga2ab1af8d438819b55319c7ef51d1e409"><td class="mdescLeft"> </td><td class="mdescRight">Delete a previously allocated heap. <br /></td></tr>
|
|
<tr class="separator:ga2ab1af8d438819b55319c7ef51d1e409"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9f9c0844edb9717f4feacd79116b8e0d" id="r_ga9f9c0844edb9717f4feacd79116b8e0d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga9f9c0844edb9717f4feacd79116b8e0d">mi_heap_destroy</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap)</td></tr>
|
|
<tr class="memdesc:ga9f9c0844edb9717f4feacd79116b8e0d"><td class="mdescLeft"> </td><td class="mdescRight">Destroy a heap, freeing all its still allocated blocks. <br /></td></tr>
|
|
<tr class="separator:ga9f9c0844edb9717f4feacd79116b8e0d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga349b677dec7da5eacdbc7a385bd62a4a" id="r_ga349b677dec7da5eacdbc7a385bd62a4a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga349b677dec7da5eacdbc7a385bd62a4a">mi_heap_set_default</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap)</td></tr>
|
|
<tr class="memdesc:ga349b677dec7da5eacdbc7a385bd62a4a"><td class="mdescLeft"> </td><td class="mdescRight">Set the default heap to use in the current thread for <a class="el" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8" title="Allocate size bytes.">mi_malloc()</a> et al. <br /></td></tr>
|
|
<tr class="separator:ga349b677dec7da5eacdbc7a385bd62a4a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga14c667a6e2c5d28762d8cb7d4e057909" id="r_ga14c667a6e2c5d28762d8cb7d4e057909"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga14c667a6e2c5d28762d8cb7d4e057909">mi_heap_get_default</a> ()</td></tr>
|
|
<tr class="memdesc:ga14c667a6e2c5d28762d8cb7d4e057909"><td class="mdescLeft"> </td><td class="mdescRight">Get the default heap that is used for <a class="el" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8" title="Allocate size bytes.">mi_malloc()</a> et al. <br /></td></tr>
|
|
<tr class="separator:ga14c667a6e2c5d28762d8cb7d4e057909"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gac6ac9f0e7be9ab4ff70acfc8dad1235a" id="r_gac6ac9f0e7be9ab4ff70acfc8dad1235a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gac6ac9f0e7be9ab4ff70acfc8dad1235a">mi_heap_get_backing</a> ()</td></tr>
|
|
<tr class="memdesc:gac6ac9f0e7be9ab4ff70acfc8dad1235a"><td class="mdescLeft"> </td><td class="mdescRight">Get the backing heap. <br /></td></tr>
|
|
<tr class="separator:gac6ac9f0e7be9ab4ff70acfc8dad1235a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga7922f7495cde30b1984d0e6072419298" id="r_ga7922f7495cde30b1984d0e6072419298"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga7922f7495cde30b1984d0e6072419298">mi_heap_collect</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, bool force)</td></tr>
|
|
<tr class="memdesc:ga7922f7495cde30b1984d0e6072419298"><td class="mdescLeft"> </td><td class="mdescRight">Release outstanding resources in a specific heap. <br /></td></tr>
|
|
<tr class="separator:ga7922f7495cde30b1984d0e6072419298"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab374e206c7034e0d899fb934e4f4a863" id="r_gab374e206c7034e0d899fb934e4f4a863"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gab374e206c7034e0d899fb934e4f4a863">mi_heap_malloc</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t size)</td></tr>
|
|
<tr class="memdesc:gab374e206c7034e0d899fb934e4f4a863"><td class="mdescLeft"> </td><td class="mdescRight">Allocate in a specific heap. <br /></td></tr>
|
|
<tr class="separator:gab374e206c7034e0d899fb934e4f4a863"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga012c5c8abe22b10043de39ff95909541" id="r_ga012c5c8abe22b10043de39ff95909541"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga012c5c8abe22b10043de39ff95909541">mi_heap_malloc_small</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t size)</td></tr>
|
|
<tr class="memdesc:ga012c5c8abe22b10043de39ff95909541"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a small object in a specific heap. <br /></td></tr>
|
|
<tr class="separator:ga012c5c8abe22b10043de39ff95909541"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gabebc796399619d964d8db77aa835e8c1" id="r_gabebc796399619d964d8db77aa835e8c1"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gabebc796399619d964d8db77aa835e8c1">mi_heap_zalloc</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t size)</td></tr>
|
|
<tr class="memdesc:gabebc796399619d964d8db77aa835e8c1"><td class="mdescLeft"> </td><td class="mdescRight">Allocate zero-initialized in a specific heap. <br /></td></tr>
|
|
<tr class="separator:gabebc796399619d964d8db77aa835e8c1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gac0098aaf231d3e9586c73136d5df95da" id="r_gac0098aaf231d3e9586c73136d5df95da"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gac0098aaf231d3e9586c73136d5df95da">mi_heap_calloc</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t count, size_t size)</td></tr>
|
|
<tr class="memdesc:gac0098aaf231d3e9586c73136d5df95da"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>count</em> zero-initialized elements in a specific heap. <br /></td></tr>
|
|
<tr class="separator:gac0098aaf231d3e9586c73136d5df95da"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab0f755c0b21c387fe8e9024200faa372" id="r_gab0f755c0b21c387fe8e9024200faa372"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gab0f755c0b21c387fe8e9024200faa372">mi_heap_mallocn</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t count, size_t size)</td></tr>
|
|
<tr class="memdesc:gab0f755c0b21c387fe8e9024200faa372"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>count</em> elements in a specific heap. <br /></td></tr>
|
|
<tr class="separator:gab0f755c0b21c387fe8e9024200faa372"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga5754e09ccc51dd6bc73885bb6ea21b7a" id="r_ga5754e09ccc51dd6bc73885bb6ea21b7a"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5754e09ccc51dd6bc73885bb6ea21b7a">mi_heap_strdup</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, const char *s)</td></tr>
|
|
<tr class="memdesc:ga5754e09ccc51dd6bc73885bb6ea21b7a"><td class="mdescLeft"> </td><td class="mdescRight">Duplicate a string in a specific heap. <br /></td></tr>
|
|
<tr class="separator:ga5754e09ccc51dd6bc73885bb6ea21b7a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gad224df78f1fbee942df8adf023e12cf3" id="r_gad224df78f1fbee942df8adf023e12cf3"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gad224df78f1fbee942df8adf023e12cf3">mi_heap_strndup</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, const char *s, size_t n)</td></tr>
|
|
<tr class="memdesc:gad224df78f1fbee942df8adf023e12cf3"><td class="mdescLeft"> </td><td class="mdescRight">Duplicate a string of at most length <em>n</em> in a specific heap. <br /></td></tr>
|
|
<tr class="separator:gad224df78f1fbee942df8adf023e12cf3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga55545a3ec6da29c5b4f62e540ecac1e2" id="r_ga55545a3ec6da29c5b4f62e540ecac1e2"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga55545a3ec6da29c5b4f62e540ecac1e2">mi_heap_realpath</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, const char *fname, char *resolved_name)</td></tr>
|
|
<tr class="memdesc:ga55545a3ec6da29c5b4f62e540ecac1e2"><td class="mdescLeft"> </td><td class="mdescRight">Resolve a file path name using a specific <em>heap</em> to allocate the result. <br /></td></tr>
|
|
<tr class="separator:ga55545a3ec6da29c5b4f62e540ecac1e2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gac5252d6a2e510bd349e4fcb452e6a93a" id="r_gac5252d6a2e510bd349e4fcb452e6a93a"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gac5252d6a2e510bd349e4fcb452e6a93a">mi_heap_realloc</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, void *p, size_t newsize)</td></tr>
|
|
<tr class="separator:gac5252d6a2e510bd349e4fcb452e6a93a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaccf7bfe10ce510a000d3547d9cf7fa29" id="r_gaccf7bfe10ce510a000d3547d9cf7fa29"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaccf7bfe10ce510a000d3547d9cf7fa29">mi_heap_reallocn</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, void *p, size_t count, size_t size)</td></tr>
|
|
<tr class="separator:gaccf7bfe10ce510a000d3547d9cf7fa29"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae7cd171425bee04c683c65a3701f0b4a" id="r_gae7cd171425bee04c683c65a3701f0b4a"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gae7cd171425bee04c683c65a3701f0b4a">mi_heap_reallocf</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, void *p, size_t newsize)</td></tr>
|
|
<tr class="separator:gae7cd171425bee04c683c65a3701f0b4a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga33f4f05b7fea7af2113c62a4bf882cc5" id="r_ga33f4f05b7fea7af2113c62a4bf882cc5"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga33f4f05b7fea7af2113c62a4bf882cc5">mi_heap_malloc_aligned</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t size, size_t alignment)</td></tr>
|
|
<tr class="separator:ga33f4f05b7fea7af2113c62a4bf882cc5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae7ffc045c3996497a7f3a5f6fe7b8aaa" id="r_gae7ffc045c3996497a7f3a5f6fe7b8aaa"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gae7ffc045c3996497a7f3a5f6fe7b8aaa">mi_heap_malloc_aligned_at</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t size, size_t alignment, size_t offset)</td></tr>
|
|
<tr class="separator:gae7ffc045c3996497a7f3a5f6fe7b8aaa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga6466bde8b5712aa34e081a8317f9f471" id="r_ga6466bde8b5712aa34e081a8317f9f471"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga6466bde8b5712aa34e081a8317f9f471">mi_heap_zalloc_aligned</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t size, size_t alignment)</td></tr>
|
|
<tr class="separator:ga6466bde8b5712aa34e081a8317f9f471"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga484e3d01cd174f78c7e53370e5a7c819" id="r_ga484e3d01cd174f78c7e53370e5a7c819"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga484e3d01cd174f78c7e53370e5a7c819">mi_heap_zalloc_aligned_at</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t size, size_t alignment, size_t offset)</td></tr>
|
|
<tr class="separator:ga484e3d01cd174f78c7e53370e5a7c819"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gacafcc26df827c7a7de5e850217566108" id="r_gacafcc26df827c7a7de5e850217566108"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gacafcc26df827c7a7de5e850217566108">mi_heap_calloc_aligned</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t count, size_t size, size_t alignment)</td></tr>
|
|
<tr class="separator:gacafcc26df827c7a7de5e850217566108"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaa42ec2079989c4374f2c331d9b35f4e4" id="r_gaa42ec2079989c4374f2c331d9b35f4e4"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaa42ec2079989c4374f2c331d9b35f4e4">mi_heap_calloc_aligned_at</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t count, size_t size, size_t alignment, size_t offset)</td></tr>
|
|
<tr class="separator:gaa42ec2079989c4374f2c331d9b35f4e4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaccf8c249872f30bf1c2493a09197d734" id="r_gaccf8c249872f30bf1c2493a09197d734"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaccf8c249872f30bf1c2493a09197d734">mi_heap_realloc_aligned</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, void *p, size_t newsize, size_t alignment)</td></tr>
|
|
<tr class="separator:gaccf8c249872f30bf1c2493a09197d734"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga6df988a7219d5707f010d5f3eb0dc3f5" id="r_ga6df988a7219d5707f010d5f3eb0dc3f5"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga6df988a7219d5707f010d5f3eb0dc3f5">mi_heap_realloc_aligned_at</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, void *p, size_t newsize, size_t alignment, size_t offset)</td></tr>
|
|
<tr class="separator:ga6df988a7219d5707f010d5f3eb0dc3f5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p>First-class heaps that can be destroyed in one go. </p>
|
|
<h2 class="groupheader">Typedef Documentation</h2>
|
|
<a id="ga34a47cde5a5b38c29f1aa3c5e76943c2" name="ga34a47cde5a5b38c29f1aa3c5e76943c2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">◆ </a></span>mi_heap_t</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef struct mi_heap_s <a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Type of first-class heaps. </p>
|
|
<p>A heap can only be used for (re)allocation in the thread that created this heap! Any allocated blocks can be freed by any other thread though. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="gac0098aaf231d3e9586c73136d5df95da" name="gac0098aaf231d3e9586c73136d5df95da"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gac0098aaf231d3e9586c73136d5df95da">◆ </a></span>mi_heap_calloc()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_calloc </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>count</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Allocate <em>count</em> zero-initialized elements in a specific heap. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56" title="Allocate zero-initialized count elements of size bytes.">mi_calloc()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gacafcc26df827c7a7de5e850217566108" name="gacafcc26df827c7a7de5e850217566108"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gacafcc26df827c7a7de5e850217566108">◆ </a></span>mi_heap_calloc_aligned()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_calloc_aligned </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>count</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>alignment</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gaa42ec2079989c4374f2c331d9b35f4e4" name="gaa42ec2079989c4374f2c331d9b35f4e4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gaa42ec2079989c4374f2c331d9b35f4e4">◆ </a></span>mi_heap_calloc_aligned_at()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_calloc_aligned_at </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>count</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>alignment</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>offset</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga7922f7495cde30b1984d0e6072419298" name="ga7922f7495cde30b1984d0e6072419298"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga7922f7495cde30b1984d0e6072419298">◆ </a></span>mi_heap_collect()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void mi_heap_collect </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>force</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Release outstanding resources in a specific heap. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga2ab1af8d438819b55319c7ef51d1e409" name="ga2ab1af8d438819b55319c7ef51d1e409"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga2ab1af8d438819b55319c7ef51d1e409">◆ </a></span>mi_heap_delete()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void mi_heap_delete </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Delete a previously allocated heap. </p>
|
|
<p>This will release resources and migrate any still allocated blocks in this heap (efficiently) to the default heap.</p>
|
|
<p>If <em>heap</em> is the default heap, the default heap is set to the backing heap. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga9f9c0844edb9717f4feacd79116b8e0d" name="ga9f9c0844edb9717f4feacd79116b8e0d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga9f9c0844edb9717f4feacd79116b8e0d">◆ </a></span>mi_heap_destroy()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void mi_heap_destroy </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Destroy a heap, freeing all its still allocated blocks. </p>
|
|
<p>Use with care as this will free all blocks still allocated in the heap. However, this can be a very efficient way to free all heap memory in one go.</p>
|
|
<p>If <em>heap</em> is the default heap, the default heap is set to the backing heap. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gac6ac9f0e7be9ab4ff70acfc8dad1235a" name="gac6ac9f0e7be9ab4ff70acfc8dad1235a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gac6ac9f0e7be9ab4ff70acfc8dad1235a">◆ </a></span>mi_heap_get_backing()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> * mi_heap_get_backing </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the backing heap. </p>
|
|
<p>The <em>backing</em> heap is the initial default heap for a thread and always available for allocations. It cannot be destroyed or deleted except by exiting the thread. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga14c667a6e2c5d28762d8cb7d4e057909" name="ga14c667a6e2c5d28762d8cb7d4e057909"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga14c667a6e2c5d28762d8cb7d4e057909">◆ </a></span>mi_heap_get_default()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> * mi_heap_get_default </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the default heap that is used for <a class="el" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8" title="Allocate size bytes.">mi_malloc()</a> et al. </p>
|
|
<p>(for the current thread). </p><dl class="section return"><dt>Returns</dt><dd>The current default heap. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gab374e206c7034e0d899fb934e4f4a863" name="gab374e206c7034e0d899fb934e4f4a863"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gab374e206c7034e0d899fb934e4f4a863">◆ </a></span>mi_heap_malloc()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_malloc </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Allocate in a specific heap. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8" title="Allocate size bytes.">mi_malloc()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga33f4f05b7fea7af2113c62a4bf882cc5" name="ga33f4f05b7fea7af2113c62a4bf882cc5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga33f4f05b7fea7af2113c62a4bf882cc5">◆ </a></span>mi_heap_malloc_aligned()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_malloc_aligned </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>alignment</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gae7ffc045c3996497a7f3a5f6fe7b8aaa" name="gae7ffc045c3996497a7f3a5f6fe7b8aaa"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gae7ffc045c3996497a7f3a5f6fe7b8aaa">◆ </a></span>mi_heap_malloc_aligned_at()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_malloc_aligned_at </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>alignment</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>offset</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga012c5c8abe22b10043de39ff95909541" name="ga012c5c8abe22b10043de39ff95909541"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga012c5c8abe22b10043de39ff95909541">◆ </a></span>mi_heap_malloc_small()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_malloc_small </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Allocate a small object in a specific heap. </p>
|
|
<p><em>size</em> must be smaller or equal to <a class="el" href="group__extended.html#ga1ea64283508718d9d645c38efc2f4305" title="Maximum size allowed for small allocations in mi_malloc_small and mi_zalloc_small (usually 128*sizeof...">MI_SMALL_SIZE_MAX()</a>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8" title="Allocate size bytes.">mi_malloc()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gab0f755c0b21c387fe8e9024200faa372" name="gab0f755c0b21c387fe8e9024200faa372"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gab0f755c0b21c387fe8e9024200faa372">◆ </a></span>mi_heap_mallocn()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_mallocn </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>count</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Allocate <em>count</em> elements in a specific heap. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6" title="Allocate count elements of size bytes.">mi_mallocn()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gaa718bb226ec0546ba6d1b6cb32179f3a" name="gaa718bb226ec0546ba6d1b6cb32179f3a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gaa718bb226ec0546ba6d1b6cb32179f3a">◆ </a></span>mi_heap_new()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> * mi_heap_new </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Create a new heap that can be used for allocation. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gac5252d6a2e510bd349e4fcb452e6a93a" name="gac5252d6a2e510bd349e4fcb452e6a93a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gac5252d6a2e510bd349e4fcb452e6a93a">◆ </a></span>mi_heap_realloc()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_realloc </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void *</td> <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>newsize</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gaccf8c249872f30bf1c2493a09197d734" name="gaccf8c249872f30bf1c2493a09197d734"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gaccf8c249872f30bf1c2493a09197d734">◆ </a></span>mi_heap_realloc_aligned()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_realloc_aligned </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void *</td> <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>newsize</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>alignment</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga6df988a7219d5707f010d5f3eb0dc3f5" name="ga6df988a7219d5707f010d5f3eb0dc3f5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga6df988a7219d5707f010d5f3eb0dc3f5">◆ </a></span>mi_heap_realloc_aligned_at()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_realloc_aligned_at </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void *</td> <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>newsize</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>alignment</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>offset</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gae7cd171425bee04c683c65a3701f0b4a" name="gae7cd171425bee04c683c65a3701f0b4a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gae7cd171425bee04c683c65a3701f0b4a">◆ </a></span>mi_heap_reallocf()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_reallocf </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void *</td> <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>newsize</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gaccf7bfe10ce510a000d3547d9cf7fa29" name="gaccf7bfe10ce510a000d3547d9cf7fa29"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gaccf7bfe10ce510a000d3547d9cf7fa29">◆ </a></span>mi_heap_reallocn()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_reallocn </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void *</td> <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>count</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga55545a3ec6da29c5b4f62e540ecac1e2" name="ga55545a3ec6da29c5b4f62e540ecac1e2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga55545a3ec6da29c5b4f62e540ecac1e2">◆ </a></span>mi_heap_realpath()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">char * mi_heap_realpath </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>fname</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char *</td> <td class="paramname"><span class="paramname"><em>resolved_name</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Resolve a file path name using a specific <em>heap</em> to allocate the result. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd" title="Resolve a file path name.">mi_realpath()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga349b677dec7da5eacdbc7a385bd62a4a" name="ga349b677dec7da5eacdbc7a385bd62a4a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga349b677dec7da5eacdbc7a385bd62a4a">◆ </a></span>mi_heap_set_default()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> * mi_heap_set_default </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the default heap to use in the current thread for <a class="el" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8" title="Allocate size bytes.">mi_malloc()</a> et al. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">heap</td><td>The new default heap. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The previous default heap. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga5754e09ccc51dd6bc73885bb6ea21b7a" name="ga5754e09ccc51dd6bc73885bb6ea21b7a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga5754e09ccc51dd6bc73885bb6ea21b7a">◆ </a></span>mi_heap_strdup()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">char * mi_heap_strdup </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>s</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Duplicate a string in a specific heap. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#ga245ac90ebc2cfdd17de599e5fea59889" title="Allocate and duplicate a string.">mi_strdup()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gad224df78f1fbee942df8adf023e12cf3" name="gad224df78f1fbee942df8adf023e12cf3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gad224df78f1fbee942df8adf023e12cf3">◆ </a></span>mi_heap_strndup()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">char * mi_heap_strndup </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>s</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>n</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Duplicate a string of at most length <em>n</em> in a specific heap. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d" title="Allocate and duplicate a string up to n bytes.">mi_strndup()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gabebc796399619d964d8db77aa835e8c1" name="gabebc796399619d964d8db77aa835e8c1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gabebc796399619d964d8db77aa835e8c1">◆ </a></span>mi_heap_zalloc()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_zalloc </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Allocate zero-initialized in a specific heap. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#gae6e38c4403247a7b40d80419e093bfb8" title="Allocate zero-initialized size bytes.">mi_zalloc()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga6466bde8b5712aa34e081a8317f9f471" name="ga6466bde8b5712aa34e081a8317f9f471"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga6466bde8b5712aa34e081a8317f9f471">◆ </a></span>mi_heap_zalloc_aligned()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_zalloc_aligned </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>alignment</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga484e3d01cd174f78c7e53370e5a7c819" name="ga484e3d01cd174f78c7e53370e5a7c819"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga484e3d01cd174f78c7e53370e5a7c819">◆ </a></span>mi_heap_zalloc_aligned_at()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void * mi_heap_zalloc_aligned_at </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *</td> <td class="paramname"><span class="paramname"><em>heap</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>size</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>alignment</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>offset</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- 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>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|