Files
recastnavigation/RecastAlloc_8h.html

508 lines
28 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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Recast Navigation: RecastAlloc.h File Reference</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>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.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" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.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">Recast Navigation
</div>
<div id="projectbrief">Navigation-mesh Toolset for Games</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<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','.html');
/* @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>
</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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('RecastAlloc_8h.html',''); initResizable(); });
/* @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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">RecastAlloc.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="RecastAssert_8h_source.html">RecastAssert.h</a>&quot;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
</div>
<p><a href="RecastAlloc_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrcNewTag.html">rcNewTag</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">An implementation of operator new usable for placement new. <a href="structrcNewTag.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrcVectorBase.html">rcVectorBase&lt; T, H &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Variable-sized storage type. <a href="classrcVectorBase.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrcTempVector.html">rcTempVector&lt; T &gt;</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrcPermVector.html">rcPermVector&lt; T &gt;</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrcIntArray.html">rcIntArray</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Legacy class. Prefer rcVector&lt;int&gt;. <a href="classrcIntArray.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrcScopedDelete.html">rcScopedDelete&lt; T &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple helper class used to delete an array when it goes out of scope. <a href="classrcScopedDelete.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a76aa1cda643d12fb282dffdd127c1bac"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#a76aa1cda643d12fb282dffdd127c1bac">RC_SIZE_MAX</a>&#160;&#160;&#160;INTPTR_MAX</td></tr>
<tr class="separator:a76aa1cda643d12fb282dffdd127c1bac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2660587d43aff9382684c2410bf2dc5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#ae2660587d43aff9382684c2410bf2dc5">rcLikely</a>(x)&#160;&#160;&#160;(x)</td></tr>
<tr class="memdesc:ae2660587d43aff9382684c2410bf2dc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macros to hint to the compiler about the likeliest branch. <a href="RecastAlloc_8h.html#ae2660587d43aff9382684c2410bf2dc5">More...</a><br /></td></tr>
<tr class="separator:ae2660587d43aff9382684c2410bf2dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97095ea2bb90ee745014fe8dc36ca483"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#a97095ea2bb90ee745014fe8dc36ca483">rcUnlikely</a>(x)&#160;&#160;&#160;(x)</td></tr>
<tr class="separator:a97095ea2bb90ee745014fe8dc36ca483"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a4f8483e0c7c0a3e42ca98cd75a5cec39"><td class="memItemLeft" align="right" valign="top">typedef void *()&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#a4f8483e0c7c0a3e42ca98cd75a5cec39">rcAllocFunc</a>(size_t size, <a class="el" href="RecastAlloc_8h.html#a1e8b4a818c5bf25bceae59a0b1857e60">rcAllocHint</a> hint)</td></tr>
<tr class="memdesc:a4f8483e0c7c0a3e42ca98cd75a5cec39"><td class="mdescLeft">&#160;</td><td class="mdescRight">A memory allocation function. <a href="RecastAlloc_8h.html#a4f8483e0c7c0a3e42ca98cd75a5cec39">More...</a><br /></td></tr>
<tr class="separator:a4f8483e0c7c0a3e42ca98cd75a5cec39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b9eeb5aeec74bff1afc64fdf8e72764"><td class="memItemLeft" align="right" valign="top">typedef void()&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#a4b9eeb5aeec74bff1afc64fdf8e72764">rcFreeFunc</a>(void *ptr)</td></tr>
<tr class="memdesc:a4b9eeb5aeec74bff1afc64fdf8e72764"><td class="mdescLeft">&#160;</td><td class="mdescRight">A memory deallocation function. <a href="RecastAlloc_8h.html#a4b9eeb5aeec74bff1afc64fdf8e72764">More...</a><br /></td></tr>
<tr class="separator:a4b9eeb5aeec74bff1afc64fdf8e72764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44d212414873bc2fc522d9e6493a4c36"><td class="memItemLeft" align="right" valign="top">typedef intptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#a44d212414873bc2fc522d9e6493a4c36">rcSizeType</a></td></tr>
<tr class="memdesc:a44d212414873bc2fc522d9e6493a4c36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signed to avoid warnnings when comparing to int loop indexes, and common error with comparing to zero. <a href="RecastAlloc_8h.html#a44d212414873bc2fc522d9e6493a4c36">More...</a><br /></td></tr>
<tr class="separator:a44d212414873bc2fc522d9e6493a4c36"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a1e8b4a818c5bf25bceae59a0b1857e60"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#a1e8b4a818c5bf25bceae59a0b1857e60">rcAllocHint</a> { <a class="el" href="RecastAlloc_8h.html#a1e8b4a818c5bf25bceae59a0b1857e60ac5753fe6be6e82f85794f719149356a5">RC_ALLOC_PERM</a>
, <a class="el" href="RecastAlloc_8h.html#a1e8b4a818c5bf25bceae59a0b1857e60a5e5b510fb1d2422e28f5262d4bd058ee">RC_ALLOC_TEMP</a>
}</td></tr>
<tr class="memdesc:a1e8b4a818c5bf25bceae59a0b1857e60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides hint values to the memory allocator on how long the memory is expected to be used. <a href="RecastAlloc_8h.html#a1e8b4a818c5bf25bceae59a0b1857e60">More...</a><br /></td></tr>
<tr class="separator:a1e8b4a818c5bf25bceae59a0b1857e60"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae3f9da3566ad0877b9e4c9e92f8e1a15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#ae3f9da3566ad0877b9e4c9e92f8e1a15">rcAllocSetCustom</a> (<a class="el" href="RecastAlloc_8h.html#a4f8483e0c7c0a3e42ca98cd75a5cec39">rcAllocFunc</a> *allocFunc, <a class="el" href="RecastAlloc_8h.html#a4b9eeb5aeec74bff1afc64fdf8e72764">rcFreeFunc</a> *freeFunc)</td></tr>
<tr class="memdesc:ae3f9da3566ad0877b9e4c9e92f8e1a15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the base custom allocation functions to be used by Recast. <a href="RecastAlloc_8h.html#ae3f9da3566ad0877b9e4c9e92f8e1a15">More...</a><br /></td></tr>
<tr class="separator:ae3f9da3566ad0877b9e4c9e92f8e1a15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaccb154539da523c5d4e6effb34dd69e"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#aaccb154539da523c5d4e6effb34dd69e">rcAlloc</a> (size_t size, <a class="el" href="RecastAlloc_8h.html#a1e8b4a818c5bf25bceae59a0b1857e60">rcAllocHint</a> hint)</td></tr>
<tr class="memdesc:aaccb154539da523c5d4e6effb34dd69e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a memory block. <a href="RecastAlloc_8h.html#aaccb154539da523c5d4e6effb34dd69e">More...</a><br /></td></tr>
<tr class="separator:aaccb154539da523c5d4e6effb34dd69e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fc4cfee655e24f94bad226f915ac397"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#a6fc4cfee655e24f94bad226f915ac397">rcFree</a> (void *ptr)</td></tr>
<tr class="memdesc:a6fc4cfee655e24f94bad226f915ac397"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocates a memory block. <a href="RecastAlloc_8h.html#a6fc4cfee655e24f94bad226f915ac397">More...</a><br /></td></tr>
<tr class="separator:a6fc4cfee655e24f94bad226f915ac397"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c17881830a1d6f4bac23a489972e2db"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#a7c17881830a1d6f4bac23a489972e2db">operator new</a> (size_t, const <a class="el" href="structrcNewTag.html">rcNewTag</a> &amp;, void *p)</td></tr>
<tr class="separator:a7c17881830a1d6f4bac23a489972e2db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a269d86e8a81c47659dfad4ab2a1e94ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="RecastAlloc_8h.html#a269d86e8a81c47659dfad4ab2a1e94ab">operator delete</a> (void *, const <a class="el" href="structrcNewTag.html">rcNewTag</a> &amp;, void *)</td></tr>
<tr class="separator:a269d86e8a81c47659dfad4ab2a1e94ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a76aa1cda643d12fb282dffdd127c1bac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76aa1cda643d12fb282dffdd127c1bac">&#9670;&nbsp;</a></span>RC_SIZE_MAX</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define RC_SIZE_MAX&#160;&#160;&#160;INTPTR_MAX</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ae2660587d43aff9382684c2410bf2dc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2660587d43aff9382684c2410bf2dc5">&#9670;&nbsp;</a></span>rcLikely</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define rcLikely</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">x</td><td>)</td>
<td>&#160;&#160;&#160;(x)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Macros to hint to the compiler about the likeliest branch. </p>
<p>Please add a benchmark that demonstrates a performance improvement before introducing use cases. </p>
</div>
</div>
<a id="a97095ea2bb90ee745014fe8dc36ca483"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97095ea2bb90ee745014fe8dc36ca483">&#9670;&nbsp;</a></span>rcUnlikely</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define rcUnlikely</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">x</td><td>)</td>
<td>&#160;&#160;&#160;(x)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a4f8483e0c7c0a3e42ca98cd75a5cec39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f8483e0c7c0a3e42ca98cd75a5cec39">&#9670;&nbsp;</a></span>rcAllocFunc</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void*() rcAllocFunc(size_t size, <a class="el" href="RecastAlloc_8h.html#a1e8b4a818c5bf25bceae59a0b1857e60">rcAllocHint</a> hint)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A memory allocation function. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="RecastAlloc_8h.html#ae3f9da3566ad0877b9e4c9e92f8e1a15" title="Sets the base custom allocation functions to be used by Recast.">rcAllocSetCustom</a> </dd></dl>
</div>
</div>
<a id="a4b9eeb5aeec74bff1afc64fdf8e72764"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b9eeb5aeec74bff1afc64fdf8e72764">&#9670;&nbsp;</a></span>rcFreeFunc</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void() rcFreeFunc(void *ptr)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A memory deallocation function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>A pointer to a memory block previously allocated using <a class="el" href="RecastAlloc_8h.html#a4f8483e0c7c0a3e42ca98cd75a5cec39" title="A memory allocation function.">rcAllocFunc</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="RecastAlloc_8h.html#ae3f9da3566ad0877b9e4c9e92f8e1a15" title="Sets the base custom allocation functions to be used by Recast.">rcAllocSetCustom</a> </dd></dl>
</div>
</div>
<a id="a44d212414873bc2fc522d9e6493a4c36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44d212414873bc2fc522d9e6493a4c36">&#9670;&nbsp;</a></span>rcSizeType</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef intptr_t <a class="el" href="RecastAlloc_8h.html#a44d212414873bc2fc522d9e6493a4c36">rcSizeType</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Signed to avoid warnnings when comparing to int loop indexes, and common error with comparing to zero. </p>
<p>MSVC2010 has a bug where ssize_t is unsigned (!!!). </p>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a1e8b4a818c5bf25bceae59a0b1857e60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e8b4a818c5bf25bceae59a0b1857e60">&#9670;&nbsp;</a></span>rcAllocHint</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="RecastAlloc_8h.html#a1e8b4a818c5bf25bceae59a0b1857e60">rcAllocHint</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Provides hint values to the memory allocator on how long the memory is expected to be used. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a1e8b4a818c5bf25bceae59a0b1857e60ac5753fe6be6e82f85794f719149356a5"></a>RC_ALLOC_PERM&#160;</td><td class="fielddoc"><p>Memory will persist after a function call. </p>
</td></tr>
<tr><td class="fieldname"><a id="a1e8b4a818c5bf25bceae59a0b1857e60a5e5b510fb1d2422e28f5262d4bd058ee"></a>RC_ALLOC_TEMP&#160;</td><td class="fielddoc"><p>Memory used temporarily within a function. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a269d86e8a81c47659dfad4ab2a1e94ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a269d86e8a81c47659dfad4ab2a1e94ab">&#9670;&nbsp;</a></span>operator delete()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void operator delete </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structrcNewTag.html">rcNewTag</a> &amp;&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a7c17881830a1d6f4bac23a489972e2db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c17881830a1d6f4bac23a489972e2db">&#9670;&nbsp;</a></span>operator new()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void* operator new </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structrcNewTag.html">rcNewTag</a> &amp;&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>p</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="aaccb154539da523c5d4e6effb34dd69e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaccb154539da523c5d4e6effb34dd69e">&#9670;&nbsp;</a></span>rcAlloc()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* rcAlloc </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="RecastAlloc_8h.html#a1e8b4a818c5bf25bceae59a0b1857e60">rcAllocHint</a>&#160;</td>
<td class="paramname"><em>hint</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocates a memory block. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size, in bytes of memory, to allocate. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">hint</td><td>A hint to the allocator on how long the memory is expected to be in use. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the beginning of the allocated memory block, or null if the allocation failed.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="RecastAlloc_8h.html#a6fc4cfee655e24f94bad226f915ac397" title="Deallocates a memory block.">rcFree</a>, <a class="el" href="RecastAlloc_8h.html#ae3f9da3566ad0877b9e4c9e92f8e1a15" title="Sets the base custom allocation functions to be used by Recast.">rcAllocSetCustom</a> </dd></dl>
</div>
</div>
<a id="ae3f9da3566ad0877b9e4c9e92f8e1a15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3f9da3566ad0877b9e4c9e92f8e1a15">&#9670;&nbsp;</a></span>rcAllocSetCustom()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void rcAllocSetCustom </td>
<td>(</td>
<td class="paramtype"><a class="el" href="RecastAlloc_8h.html#a4f8483e0c7c0a3e42ca98cd75a5cec39">rcAllocFunc</a> *&#160;</td>
<td class="paramname"><em>allocFunc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="RecastAlloc_8h.html#a4b9eeb5aeec74bff1afc64fdf8e72764">rcFreeFunc</a> *&#160;</td>
<td class="paramname"><em>freeFunc</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the base custom allocation functions to be used by Recast. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">allocFunc</td><td>The memory allocation function to be used by <a class="el" href="RecastAlloc_8h.html#aaccb154539da523c5d4e6effb34dd69e" title="Allocates a memory block.">rcAlloc</a> </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">freeFunc</td><td>The memory de-allocation function to be used by <a class="el" href="RecastAlloc_8h.html#a6fc4cfee655e24f94bad226f915ac397" title="Deallocates a memory block.">rcFree</a></td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="RecastAlloc_8h.html#aaccb154539da523c5d4e6effb34dd69e" title="Allocates a memory block.">rcAlloc</a>, <a class="el" href="RecastAlloc_8h.html#a6fc4cfee655e24f94bad226f915ac397" title="Deallocates a memory block.">rcFree</a> </dd></dl>
</div>
</div>
<a id="a6fc4cfee655e24f94bad226f915ac397"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fc4cfee655e24f94bad226f915ac397">&#9670;&nbsp;</a></span>rcFree()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void rcFree </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>ptr</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deallocates a memory block. </p>
<p>If <code>ptr</code> is NULL, this does nothing.</p>
<dl class="section warning"><dt>Warning</dt><dd>This function leaves the value of <code>ptr</code> unchanged. So it still points to the same (now invalid) location, and not to null.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>A pointer to a memory block previously allocated using <a class="el" href="RecastAlloc_8h.html#aaccb154539da523c5d4e6effb34dd69e" title="Allocates a memory block.">rcAlloc</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="RecastAlloc_8h.html#aaccb154539da523c5d4e6effb34dd69e" title="Allocates a memory block.">rcAlloc</a>, <a class="el" href="RecastAlloc_8h.html#ae3f9da3566ad0877b9e4c9e92f8e1a15" title="Sets the base custom allocation functions to be used by Recast.">rcAllocSetCustom</a> </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_e6cf54c9d4d29ff4a28752d861cf44fa.html">Recast</a></li><li class="navelem"><a class="el" href="dir_d328474a4d9142b17be669c58a1761c1.html">Include</a></li><li class="navelem"><a class="el" href="RecastAlloc_8h.html">RecastAlloc.h</a></li>
&nbsp;&nbsp;<a href="https://github.com/recastnavigation/recastnavigation">Project Home</a>
| <a href="./License.txt">Licence (ZLib)</a>
| Copyright 2009 Mikko Mononen
</ul>
</div>
</body>
</html>