aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02996.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a02996.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a02996.html')
-rw-r--r--docs/doxygen/nel/a02996.html489
1 files changed, 489 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02996.html b/docs/doxygen/nel/a02996.html
new file mode 100644
index 00000000..22bcf76b
--- /dev/null
+++ b/docs/doxygen/nel/a02996.html
@@ -0,0 +1,489 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>NeL: NLMISC::CObjectArenaAllocator class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.6 -->
+<div class="qindex"> <form class="search" action="search.php" method="get">
+<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NLMISC::CObjectArenaAllocator Class Reference</h1><code>#include &lt;<a class="el" href="a06110.html">object_arena_allocator.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+An allocator that can allocate/release in O(1) for a finite number of possible blocks size (usually small).. For a given block size, a fixed size allocator is used. One possible use is with a family of class for which new and delete have been redefined at the top of the hierarchy (which the NL_USES_DEFAULT_ARENA_OBJECT_ALLOCATOR does)<p>
+: thread safety<p>
+<dl compact><dt><b>Author:</b></dt><dd>Nicolas Vizerie <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2004 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06110.html#l00046">46</a> of file <a class="el" href="a06110.html">object_arena_allocator.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatora0">alloc</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a587">size</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatora1">CObjectArenaAllocator</a> (<a class="el" href="a04558.html#a15">uint</a> maxAllocSize, <a class="el" href="a04558.html#a15">uint</a> granularity=4)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatora2">free</a> (void *)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatora3">getNumAllocatedBlocks</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatora4">~CObjectArenaAllocator</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02996.html">CObjectArenaAllocator</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatore0">getDefaultAllocator</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr0">_Granularity</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr1">_MaxAllocSize</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a02533.html">CFixedSizeAllocator</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a></td></tr>
+
+<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02996.html">CObjectArenaAllocator</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorv0">_DefaultAllocator</a> = NULL</td></tr>
+
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatora1" doxytag="NLMISC::CObjectArenaAllocator::CObjectArenaAllocator" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NLMISC::CObjectArenaAllocator::CObjectArenaAllocator </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>maxAllocSize</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>granularity</em> = 4</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+ctor <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>maxAllocSize</em>&nbsp;</td><td>maximum intended size of allocation.</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06109.html#l00037">37</a> of file <a class="el" href="a06109.html">object_arena_allocator.cpp</a>.
+<p>
+References <a class="el" href="a06110.html#l00074">_Granularity</a>, <a class="el" href="a06110.html#l00073">_MaxAllocSize</a>, <a class="el" href="a06110.html#l00072">_ObjectSizeToAllocator</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06109.html#l00149">getDefaultAllocator()</a>.
+<p>
+<div class="fragment"><pre>00038 {
+00039 <a class="code" href="a04199.html#a6">nlassert</a>(granularity &gt; 0);
+00040 <a class="code" href="a04199.html#a6">nlassert</a>(maxAllocSize &gt; 0);
+00041 <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr1">_MaxAllocSize</a> = granularity * ((maxAllocSize + (granularity - 1)) / granularity);
+00042 <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>.resize(_MaxAllocSize / granularity, NULL);
+00043 <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr0">_Granularity</a> = granularity;
+00044 <span class="preprocessor"> #ifdef NL_DEBUG</span>
+00045 <span class="preprocessor"></span> _AllocID = 0;
+00046 _WantBreakOnAlloc = <span class="keyword">false</span>;
+00047 _BreakAllocID = 0;
+00048 <span class="preprocessor"> #endif</span>
+00049 <span class="preprocessor"></span>}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatora4" doxytag="NLMISC::CObjectArenaAllocator::~CObjectArenaAllocator" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NLMISC::CObjectArenaAllocator::~<a class="el" href="a02996.html">CObjectArenaAllocator</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06109.html#l00052">52</a> of file <a class="el" href="a06109.html">object_arena_allocator.cpp</a>.
+<p>
+References <a class="el" href="a06110.html#l00072">_ObjectSizeToAllocator</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00053 {
+00054 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>.size(); ++k)
+00055 {
+00056 <span class="keyword">delete</span> <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>[k];
+00057 }
+00058 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatora0" doxytag="NLMISC::CObjectArenaAllocator::alloc" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void * NLMISC::CObjectArenaAllocator::alloc </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>size</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Allocate a block with the given size. 0 is an invalid size an will cause an assert. If the size is &gt; to the max size given at init, the allocation will succeed, but will use the standard allocator.
+<p>
+Definition at line <a class="el" href="a06109.html#l00061">61</a> of file <a class="el" href="a06109.html">object_arena_allocator.cpp</a>.
+<p>
+References <a class="el" href="a06110.html#l00074">_Granularity</a>, <a class="el" href="a06110.html#l00073">_MaxAllocSize</a>, <a class="el" href="a06110.html#l00072">_ObjectSizeToAllocator</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00062 {
+00063 <span class="preprocessor"> #ifdef NL_DEBUG</span>
+00064 <span class="preprocessor"></span> <span class="keywordflow">if</span> (_WantBreakOnAlloc)
+00065 {
+00066 <span class="keywordflow">if</span> (_AllocID == _BreakAllocID)
+00067 {
+00068 <a class="code" href="a04199.html#a6">nlassert</a>(0);
+00069 }
+00070 }
+00071 <span class="preprocessor"> #endif</span>
+00072 <span class="preprocessor"></span> <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a587">size</a> &gt; <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr1">_MaxAllocSize</a>)
+00073 {
+00074 <span class="comment">// use standard allocator</span>
+00075 <a class="code" href="a04558.html#a7">uint8</a> *block = <span class="keyword">new</span> <a class="code" href="a04558.html#a7">uint8</a>[<a class="code" href="a04223.html#a587">size</a> + <span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a15">uint</a>)]; <span class="comment">// an additionnal uint is needed to store size of block </span>
+00076 <span class="keywordflow">if</span> (!block) <span class="keywordflow">return</span> NULL;
+00077 <span class="preprocessor"> #ifdef NL_DEBUG </span>
+00078 <span class="preprocessor"></span> _MemBlockToAllocID[block] = _AllocID;
+00079 <span class="preprocessor"> #endif</span>
+00080 <span class="preprocessor"></span> *(<a class="code" href="a04558.html#a15">uint</a> *) block = <a class="code" href="a04223.html#a587">size</a>;
+00081 <span class="keywordflow">return</span> block + <span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a15">uint</a>);
+00082 }
+00083 <a class="code" href="a04558.html#a15">uint</a> entry = ((<a class="code" href="a04223.html#a587">size</a> + (<a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr0">_Granularity</a> - 1)) / <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr0">_Granularity</a>) ;
+00084 <span class="keywordflow">if</span> (!<a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>[entry])
+00085 {
+00086 <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>[entry] = <span class="keyword">new</span> CFixedSizeAllocator(entry * _Granularity + <span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a15">uint</a>), _MaxAllocSize / size); <span class="comment">// an additionnal uint is needed to store size of block</span>
+00087 }
+00088 <span class="keywordtype">void</span> *block = <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>[entry]-&gt;alloc();
+00089 <span class="preprocessor"> #ifdef NL_DEBUG</span>
+00090 <span class="preprocessor"></span> <span class="keywordflow">if</span> (block)
+00091 {
+00092 _MemBlockToAllocID[block] = _AllocID;
+00093 }
+00094 ++_AllocID;
+00095 <span class="preprocessor"> #endif</span>
+00096 <span class="preprocessor"></span> *(<a class="code" href="a04558.html#a15">uint</a> *) block = <a class="code" href="a04223.html#a587">size</a>;
+00097 <span class="keywordflow">return</span> (<span class="keywordtype">void</span> *) ((<a class="code" href="a04558.html#a7">uint8</a> *) block + <span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a15">uint</a>));
+00098 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatora2" doxytag="NLMISC::CObjectArenaAllocator::free" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CObjectArenaAllocator::free </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06109.html#l00101">101</a> of file <a class="el" href="a06109.html">object_arena_allocator.cpp</a>.
+<p>
+References <a class="el" href="a06110.html#l00074">_Granularity</a>, <a class="el" href="a06110.html#l00073">_MaxAllocSize</a>, <a class="el" href="a06110.html#l00072">_ObjectSizeToAllocator</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00102 {
+00103 <span class="keywordflow">if</span> (!block) <span class="keywordflow">return</span>;
+00104 <a class="code" href="a04558.html#a7">uint8</a> *realBlock = (<a class="code" href="a04558.html#a7">uint8</a> *) block - <span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a15">uint</a>); <span class="comment">// a uin is used at start of block to give its size</span>
+00105 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = *(<a class="code" href="a04558.html#a15">uint</a> *) realBlock;
+00106 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a587">size</a> &gt; <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr1">_MaxAllocSize</a>)
+00107 {
+00108 <span class="preprocessor"> #ifdef NL_DEBUG</span>
+00109 <span class="preprocessor"></span> std::map&lt;void *, uint&gt;::iterator it = _MemBlockToAllocID.find(realBlock);
+00110 <a class="code" href="a04199.html#a6">nlassert</a>(it != _MemBlockToAllocID.end());
+00111 _MemBlockToAllocID.erase(it);
+00112 <span class="preprocessor"> #endif</span>
+00113 <span class="preprocessor"></span> <span class="keyword">delete</span> realBlock;
+00114 <span class="keywordflow">return</span>;
+00115 }
+00116 <a class="code" href="a04558.html#a15">uint</a> entry = ((<a class="code" href="a04223.html#a587">size</a> + (<a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr0">_Granularity</a> - 1)) / <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr0">_Granularity</a>);
+00117 <a class="code" href="a04199.html#a6">nlassert</a>(entry &lt; <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>.size());
+00118 <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>[entry]-&gt;free(realBlock);
+00119 <span class="preprocessor"> #ifdef NL_DEBUG</span>
+00120 <span class="preprocessor"></span> std::map&lt;void *, uint&gt;::iterator it = _MemBlockToAllocID.find(realBlock);
+00121 <a class="code" href="a04199.html#a6">nlassert</a>(it != _MemBlockToAllocID.end());
+00122 <span class="comment">/*</span>
+00123 <span class="comment"> #ifdef NL_DEBUG</span>
+00124 <span class="comment"> if (_WantBreakOnAlloc)</span>
+00125 <span class="comment"> {</span>
+00126 <span class="comment"> if (it-&gt;second == _BreakAllocID)</span>
+00127 <span class="comment"> {</span>
+00128 <span class="comment"> nlassert(0);</span>
+00129 <span class="comment"> }</span>
+00130 <span class="comment"> }</span>
+00131 <span class="comment"> #endif</span>
+00132 <span class="comment"> */</span>
+00133 _MemBlockToAllocID.erase(it);
+00134 <span class="preprocessor"> #endif</span>
+00135 <span class="preprocessor"></span>}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatore0" doxytag="NLMISC::CObjectArenaAllocator::getDefaultAllocator" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a02996.html">CObjectArenaAllocator</a> &amp; NLMISC::CObjectArenaAllocator::getDefaultAllocator </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06109.html#l00149">149</a> of file <a class="el" href="a06109.html">object_arena_allocator.cpp</a>.
+<p>
+References <a class="el" href="a06109.html#l00033">_DefaultAllocator</a>, and <a class="el" href="a06109.html#l00037">CObjectArenaAllocator()</a>.
+<p>
+<div class="fragment"><pre>00150 {
+00151 <span class="keywordflow">if</span> (!<a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorv0">_DefaultAllocator</a>)
+00152 {
+00153 <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorv0">_DefaultAllocator</a> = <span class="keyword">new</span> <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatora1">CObjectArenaAllocator</a>(32768);
+00154 }
+00155 <span class="keywordflow">return</span> *<a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorv0">_DefaultAllocator</a>;
+00156 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatora3" doxytag="NLMISC::CObjectArenaAllocator::getNumAllocatedBlocks" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NLMISC::CObjectArenaAllocator::getNumAllocatedBlocks </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06109.html#l00138">138</a> of file <a class="el" href="a06109.html">object_arena_allocator.cpp</a>.
+<p>
+References <a class="el" href="a06110.html#l00072">_ObjectSizeToAllocator</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00139 {
+00140 <a class="code" href="a04558.html#a15">uint</a> numObjs = 0;
+00141 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>.size(); ++k)
+00142 {
+00143 <span class="keywordflow">if</span> (<a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>[k]) numObjs += <a class="code" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">_ObjectSizeToAllocator</a>[k]-&gt;getNumAllocatedBlocks();
+00144 }
+00145 <span class="keywordflow">return</span> numObjs;
+00146 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatorv0" doxytag="NLMISC::CObjectArenaAllocator::_DefaultAllocator" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a02996.html">CObjectArenaAllocator</a> * <a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorv0">NLMISC::CObjectArenaAllocator::_DefaultAllocator</a> = NULL<code> [static, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06109.html#l00033">33</a> of file <a class="el" href="a06109.html">object_arena_allocator.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06109.html#l00149">getDefaultAllocator()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatorr0" doxytag="NLMISC::CObjectArenaAllocator::_Granularity" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr0">NLMISC::CObjectArenaAllocator::_Granularity</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06110.html#l00074">74</a> of file <a class="el" href="a06110.html">object_arena_allocator.h</a>.
+<p>
+Referenced by <a class="el" href="a06109.html#l00061">alloc()</a>, <a class="el" href="a06109.html#l00037">CObjectArenaAllocator()</a>, and <a class="el" href="a06109.html#l00101">free()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatorr1" doxytag="NLMISC::CObjectArenaAllocator::_MaxAllocSize" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr1">NLMISC::CObjectArenaAllocator::_MaxAllocSize</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06110.html#l00073">73</a> of file <a class="el" href="a06110.html">object_arena_allocator.h</a>.
+<p>
+Referenced by <a class="el" href="a06109.html#l00061">alloc()</a>, <a class="el" href="a06109.html#l00037">CObjectArenaAllocator()</a>, and <a class="el" href="a06109.html#l00101">free()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CObjectArenaAllocatorr2" doxytag="NLMISC::CObjectArenaAllocator::_ObjectSizeToAllocator" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="a02533.html">CFixedSizeAllocator</a> *&gt; <a class="el" href="a02996.html#NLMISC_1_1CObjectArenaAllocatorr2">NLMISC::CObjectArenaAllocator::_ObjectSizeToAllocator</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06110.html#l00072">72</a> of file <a class="el" href="a06110.html">object_arena_allocator.h</a>.
+<p>
+Referenced by <a class="el" href="a06109.html#l00061">alloc()</a>, <a class="el" href="a06109.html#l00037">CObjectArenaAllocator()</a>, <a class="el" href="a06109.html#l00101">free()</a>, <a class="el" href="a06109.html#l00138">getNumAllocatedBlocks()</a>, and <a class="el" href="a06109.html#l00052">~CObjectArenaAllocator()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06110.html">object_arena_allocator.h</a><li><a class="el" href="a06109.html">object_arena_allocator.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:23:37 2004 for NeL by
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
+</a>1.3.6 </small></address>
+</body>
+</html>