wut/memblockheap_8h_source.html

113 lines
35 KiB
HTML
Raw Normal View History

2019-04-22 10:21:17 +10:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2018-07-26 20:52:03 +10:00
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
2019-04-22 10:21:17 +10:00
<meta name="generator" content="Doxygen 1.8.15"/>
2018-07-26 20:52:03 +10:00
<meta name="viewport" content="width=device-width, initial-scale=1"/>
2019-04-22 10:21:17 +10:00
<title>wut: /home/ash/src/wut/include/coreinit/memblockheap.h Source File</title>
2018-07-26 20:52:03 +10:00
<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>
<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>
<link href="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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">wut
2019-04-22 10:21:17 +10:00
&#160;<span id="projectnumber">1.0.0-beta8</span>
2018-07-26 20:52:03 +10:00
</div>
<div id="projectbrief">Wii U Toolchain</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
2019-04-22 10:21:17 +10:00
<!-- Generated by Doxygen 1.8.15 -->
2018-07-26 20:52:03 +10:00
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- 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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_5050f3de292bd66075be80c4b119f1df.html">coreinit</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">memblockheap.h</div> </div>
</div><!--header-->
<div class="contents">
2019-04-22 10:21:17 +10:00
<a href="memblockheap_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="wut_8h.html">wut.h</a>&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="memheap_8h.html">memheap.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="group__coreinit__memblockheap.html#ga45858f039e5b8daf978d07f9a1391e00"> 15</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__coreinit__memblockheap.html#structMEMBlockHeapBlock">MEMBlockHeapBlock</a> <a class="code" href="group__coreinit__memblockheap.html#structMEMBlockHeapBlock">MEMBlockHeapBlock</a>;</div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="group__coreinit__memblockheap.html#gae0f581440e5db253705623676676c41e"> 16</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__coreinit__memblockheap.html#structMEMBlockHeapTracking">MEMBlockHeapTracking</a> <a class="code" href="group__coreinit__memblockheap.html#structMEMBlockHeapTracking">MEMBlockHeapTracking</a>;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="group__coreinit__memblockheap.html#gaafcc77af210f6c02bf83bc3eeffd48fa"> 17</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__coreinit__memblockheap.html#structMEMBlockHeap">MEMBlockHeap</a> <a class="code" href="group__coreinit__memblockheap.html#structMEMBlockHeap">MEMBlockHeap</a>;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="group__coreinit__memblockheap.html"> 19</a></span>&#160;<span class="keyword">struct </span><a class="code" href="group__coreinit__memblockheap.html#structMEMBlockHeapTracking">MEMBlockHeapTracking</a></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;{</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; WUT_UNKNOWN_BYTES(0x8);</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="group__coreinit__memblockheap.html#a4f75f3d0d6821b9881231c1d487fe063"> 24</a></span>&#160; <a class="code" href="group__coreinit__memblockheap.html#structMEMBlockHeapBlock">MEMBlockHeapBlock</a> *<a class="code" href="group__coreinit__memblockheap.html#a4f75f3d0d6821b9881231c1d487fe063">blocks</a>;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="group__coreinit__memblockheap.html#a359235f8ff745acf36826f7859097c4f"> 27</a></span>&#160; uint32_t <a class="code" href="group__coreinit__memblockheap.html#a359235f8ff745acf36826f7859097c4f">blockCount</a>;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;};</div><div class=
<div class="ttc" id="group__coreinit__memblockheap_html_a9a3455df6b2b78a203ed590ebcef3e15"><div class="ttname"><a href="group__coreinit__memblockheap.html#a9a3455df6b2b78a203ed590ebcef3e15">MEMBlockHeapBlock::prev</a></div><div class="ttdeci">MEMBlockHeapBlock * prev</div><div class="ttdoc">Link to previous block, note that this is only set for allocated blocks.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00045">memblockheap.h:45</a></div></div>
2018-07-26 20:52:03 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_gafa99a5006b7a01dab5c7940855653e3d"><div class="ttname"><a href="group__coreinit__memblockheap.html#gafa99a5006b7a01dab5c7940855653e3d">MEMGetAllocatableSizeForBlockHeapEx</a></div><div class="ttdeci">uint32_t MEMGetAllocatableSizeForBlockHeapEx(MEMHeapHandle heap, int32_t align)</div></div>
2019-04-22 10:21:17 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_a2280d787d75d6e93f7c8b771a597d65a"><div class="ttname"><a href="group__coreinit__memblockheap.html#a2280d787d75d6e93f7c8b771a597d65a">MEMBlockHeapBlock::next</a></div><div class="ttdeci">MEMBlockHeapBlock * next</div><div class="ttdoc">Link to next block, always set.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00048">memblockheap.h:48</a></div></div>
2018-07-26 20:52:03 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_structMEMBlockHeapBlock"><div class="ttname"><a href="group__coreinit__memblockheap.html#structMEMBlockHeapBlock">MEMBlockHeapBlock</a></div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00033">memblockheap.h:33</a></div></div>
2019-04-22 10:21:17 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_a3f489ef875557f592a5c0dd7bcbfbcc5"><div class="ttname"><a href="group__coreinit__memblockheap.html#a3f489ef875557f592a5c0dd7bcbfbcc5">MEMBlockHeap::firstBlock</a></div><div class="ttdeci">MEMBlockHeapBlock * firstBlock</div><div class="ttdoc">First block in this heap.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00068">memblockheap.h:68</a></div></div>
2018-07-26 20:52:03 +10:00
<div class="ttc" id="memheap_8h_html"><div class="ttname"><a href="memheap_8h.html">memheap.h</a></div></div>
2019-04-22 10:21:17 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_abd9603779f3c7d87e0aff060d2033262"><div class="ttname"><a href="group__coreinit__memblockheap.html#abd9603779f3c7d87e0aff060d2033262">MEMBlockHeap::lastBlock</a></div><div class="ttdeci">MEMBlockHeapBlock * lastBlock</div><div class="ttdoc">Last block in this heap.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00071">memblockheap.h:71</a></div></div>
2018-07-26 20:52:03 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_ga30a71593e33c89701ab7348f9016b877"><div class="ttname"><a href="group__coreinit__memblockheap.html#ga30a71593e33c89701ab7348f9016b877">MEMAddBlockHeapTracking</a></div><div class="ttdeci">int MEMAddBlockHeapTracking(MEMHeapHandle heap, MEMBlockHeapTracking *tracking, uint32_t size)</div></div>
<div class="ttc" id="group__coreinit__memblockheap_html_ga6cc8343702218c9b8bbc2d3f9fb015e0"><div class="ttname"><a href="group__coreinit__memblockheap.html#ga6cc8343702218c9b8bbc2d3f9fb015e0">MEMAllocFromBlockHeapAt</a></div><div class="ttdeci">void * MEMAllocFromBlockHeapAt(MEMHeapHandle heap, void *addr, uint32_t size)</div></div>
<div class="ttc" id="group__coreinit__memblockheap_html_ga8e0ed5528d811a7724fc5160c29e9606"><div class="ttname"><a href="group__coreinit__memblockheap.html#ga8e0ed5528d811a7724fc5160c29e9606">MEMGetTotalFreeSizeForBlockHeap</a></div><div class="ttdeci">uint32_t MEMGetTotalFreeSizeForBlockHeap(MEMHeapHandle heap)</div></div>
<div class="ttc" id="group__coreinit__memblockheap_html_structMEMBlockHeapTracking"><div class="ttname"><a href="group__coreinit__memblockheap.html#structMEMBlockHeapTracking">MEMBlockHeapTracking</a></div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00019">memblockheap.h:19</a></div></div>
2019-04-22 10:21:17 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_a4f75f3d0d6821b9881231c1d487fe063"><div class="ttname"><a href="group__coreinit__memblockheap.html#a4f75f3d0d6821b9881231c1d487fe063">MEMBlockHeapTracking::blocks</a></div><div class="ttdeci">MEMBlockHeapBlock * blocks</div><div class="ttdoc">Pointer to first memory block.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00024">memblockheap.h:24</a></div></div>
<div class="ttc" id="group__coreinit__memblockheap_html_a90bce83e474fb5ecdead9d23129c1769"><div class="ttname"><a href="group__coreinit__memblockheap.html#a90bce83e474fb5ecdead9d23129c1769">MEMBlockHeap::defaultBlock</a></div><div class="ttdeci">MEMBlockHeapBlock defaultBlock</div><div class="ttdoc">Default block, used so we don't have an empty block list.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00065">memblockheap.h:65</a></div></div>
2018-07-26 20:52:03 +10:00
<div class="ttc" id="wut_8h_html"><div class="ttname"><a href="wut_8h.html">wut.h</a></div></div>
2019-04-22 10:21:17 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_a69e21124166fecc9aedafa4e05e03647"><div class="ttname"><a href="group__coreinit__memblockheap.html#a69e21124166fecc9aedafa4e05e03647">MEMBlockHeap::firstFreeBlock</a></div><div class="ttdeci">MEMBlockHeapBlock * firstFreeBlock</div><div class="ttdoc">First free block.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00074">memblockheap.h:74</a></div></div>
<div class="ttc" id="group__coreinit__memblockheap_html_a6be42b3eb9e8a90b22026f94742b5c28"><div class="ttname"><a href="group__coreinit__memblockheap.html#a6be42b3eb9e8a90b22026f94742b5c28">MEMBlockHeapBlock::isFree</a></div><div class="ttdeci">BOOL isFree</div><div class="ttdoc">TRUE if the block is free, FALSE if allocated.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00042">memblockheap.h:42</a></div></div>
2018-07-26 20:52:03 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_structMEMBlockHeap"><div class="ttname"><a href="group__coreinit__memblockheap.html#structMEMBlockHeap">MEMBlockHeap</a></div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00057">memblockheap.h:57</a></div></div>
<div class="ttc" id="wut__types_8h_html_a975dbe9e4396bf9e0064ce01827fa372"><div class="ttname"><a href="wut__types_8h.html#a975dbe9e4396bf9e0064ce01827fa372">BOOL</a></div><div class="ttdeci">int32_t BOOL</div><div class="ttdef"><b>Definition:</b> <a href="wut__types_8h_source.html#l00004">wut_types.h:4</a></div></div>
2019-04-22 10:21:17 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_a40cdb39a4cee4e97f19cac636ceaa02a"><div class="ttname"><a href="group__coreinit__memblockheap.html#a40cdb39a4cee4e97f19cac636ceaa02a">MEMBlockHeap::numFreeBlocks</a></div><div class="ttdeci">uint32_t numFreeBlocks</div><div class="ttdoc">Free block count.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00077">memblockheap.h:77</a></div></div>
2018-07-26 20:52:03 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_ga46abe0977e0c389cb0c33c0ca9b4291f"><div class="ttname"><a href="group__coreinit__memblockheap.html#ga46abe0977e0c389cb0c33c0ca9b4291f">MEMGetTrackingLeftInBlockHeap</a></div><div class="ttdeci">uint32_t MEMGetTrackingLeftInBlockHeap(MEMHeapHandle heap)</div></div>
<div class="ttc" id="group__coreinit__memblockheap_html_ga52ca015c65c37752d49595d9c20feb4a"><div class="ttname"><a href="group__coreinit__memblockheap.html#ga52ca015c65c37752d49595d9c20feb4a">MEMInitBlockHeap</a></div><div class="ttdeci">MEMHeapHandle MEMInitBlockHeap(MEMBlockHeap *heap, void *start, void *end, MEMBlockHeapTracking *blocks, uint32_t size, uint32_t flags)</div></div>
<div class="ttc" id="group__coreinit__memblockheap_html_ga29b47fa5eabf58d9bcd28e3cc7af2e6b"><div class="ttname"><a href="group__coreinit__memblockheap.html#ga29b47fa5eabf58d9bcd28e3cc7af2e6b">MEMAllocFromBlockHeapEx</a></div><div class="ttdeci">void * MEMAllocFromBlockHeapEx(MEMHeapHandle heap, uint32_t size, int32_t align)</div></div>
2019-04-22 10:21:17 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_a359235f8ff745acf36826f7859097c4f"><div class="ttname"><a href="group__coreinit__memblockheap.html#a359235f8ff745acf36826f7859097c4f">MEMBlockHeapTracking::blockCount</a></div><div class="ttdeci">uint32_t blockCount</div><div class="ttdoc">Number of blocks in this tracking heap.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00027">memblockheap.h:27</a></div></div>
2018-07-26 20:52:03 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_ga8df189ceaad03ebb265f8e90dc76d3ab"><div class="ttname"><a href="group__coreinit__memblockheap.html#ga8df189ceaad03ebb265f8e90dc76d3ab">MEMDestroyBlockHeap</a></div><div class="ttdeci">void * MEMDestroyBlockHeap(MEMHeapHandle heap)</div></div>
<div class="ttc" id="group__coreinit__memheap_html_structMEMHeapHeader"><div class="ttname"><a href="group__coreinit__memheap.html#structMEMHeapHeader">MEMHeapHeader</a></div><div class="ttdef"><b>Definition:</b> <a href="memheap_8h_source.html#l00051">memheap.h:51</a></div></div>
2019-04-22 10:21:17 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_aa95b31244ef58f22a5f337c625bd5da6"><div class="ttname"><a href="group__coreinit__memblockheap.html#aa95b31244ef58f22a5f337c625bd5da6">MEMBlockHeap::defaultTrack</a></div><div class="ttdeci">MEMBlockHeapTracking defaultTrack</div><div class="ttdoc">Default tracking heap, tracks only defaultBlock.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00062">memblockheap.h:62</a></div></div>
<div class="ttc" id="group__coreinit__memblockheap_html_a57dfa4d169c6b9c0b4e7352bc0c34366"><div class="ttname"><a href="group__coreinit__memblockheap.html#a57dfa4d169c6b9c0b4e7352bc0c34366">MEMBlockHeapBlock::end</a></div><div class="ttdeci">void * end</div><div class="ttdoc">End address of the data region this block has allocated.</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00039">memblockheap.h:39</a></div></div>
2018-07-26 20:52:03 +10:00
<div class="ttc" id="group__coreinit__memblockheap_html_a0edcfdc3d5cf965f0929bf203c4a1dbb"><div class="ttname"><a href="group__coreinit__memblockheap.html#a0edcfdc3d5cf965f0929bf203c4a1dbb">MEMBlockHeap::header</a></div><div class="ttdeci">MEMHeapHeader header</div><div class="ttdef"><b>Definition:</b> <a href="memblockheap_8h_source.html#l00059">memblockheap.h:59</a></div></div>
<div class="ttc" id="group__coreinit__memblockheap_html_gaac5a2ac967312da58eeee78d3fabf1dd"><div class="ttname"><a href="group__coreinit__memblockheap.html#gaac5a2ac967312da58eeee78d3fabf1dd">MEMFreeToBlockHeap</a></div><div class="ttdeci">void MEMFreeToBlockHeap(MEMHeapHandle heap, void *data)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
2019-04-22 10:21:17 +10:00
</a> 1.8.15
2018-07-26 20:52:03 +10:00
</small></address>
</body>
</html>