aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02610.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/a02610.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/a02610.html5862
1 files changed, 5862 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02610.html b/docs/doxygen/nel/a02610.html
new file mode 100644
index 00000000..18d6fc4a
--- /dev/null
+++ b/docs/doxygen/nel/a02610.html
@@ -0,0 +1,5862 @@
+<!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: NLMEMORY::CHeapAllocator 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>NLMEMORY::CHeapAllocator Class Reference</h1><code>#include &lt;<a class="el" href="a05777.html">heap_allocator.h</a>&gt;</code>
+<p>
+<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Small Block</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom>{ <br>
+&nbsp;&nbsp;<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw6">SmallBlockGranularityShift</a> = 3,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw5">SmallBlockGranularity</a> = 1&lt;&lt;SmallBlockGranularityShift,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw1">FirstSmallBlock</a> = 8,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw3">LastSmallBlock</a> = 128,
+<br>
+&nbsp;&nbsp;<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw7">SmallBlockPoolSize</a> = 20
+<br>
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_1">checkNodeSB</a> (const <a class="el" href="a02626.html">CSmallBlockPool</a> *mainBlock, const <a class="el" href="a02620.html">CNodeBegin</a> *previous, const <a class="el" href="a02620.html">CNodeBegin</a> *current, const <a class="el" href="a02620.html">CNodeBegin</a> *next, bool stopOnError) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_2">internalAllocateBlock</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>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_3">outOfMemory</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>volatile <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_4">_FreeSmallBlocks</a> [(1+(LastSmallBlock-FirstSmallBlock)/SmallBlockGranularity)]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02855.html">CMemoryMutex</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_5">_MutexSB</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>volatile <a class="el" href="a02626.html">CSmallBlockPool</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_6">_SmallBlockPool</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_7">getNextSmallBlock</a> (<a class="el" href="a02620.html">CNodeBegin</a> *previous)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_8">getSmallBlock</a> (<a class="el" href="a02626.html">CSmallBlockPool</a> *smallBlock, <a class="el" href="a04558.html#a15">uint</a> blockIndex)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_9">setNextSmallBlock</a> (<a class="el" href="a02620.html">CNodeBegin</a> *previous, <a class="el" href="a02620.html">CNodeBegin</a> *next)</td></tr>
+
+<tr><td colspan=2><br><h2>Interface</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">TBlockAllocationMode</a> { <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0NLMEMORY_1_1CHeapAllocatorw2">Grow</a>,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0NLMEMORY_1_1CHeapAllocatorw0">DontGrow</a>
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">TOutOfMemoryMode</a> { <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1NLMEMORY_1_1CHeapAllocatorw8">ThrowException</a>,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1NLMEMORY_1_1CHeapAllocatorw4">ReturnNull</a>
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_2">CHeapAllocator</a> (<a class="el" href="a04558.html#a15">uint</a> mainBlockSize=1024 *1024 *10, <a class="el" href="a04558.html#a15">uint</a> blockCount=1, <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">TBlockAllocationMode</a> blockAllocationMode=Grow, <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">TOutOfMemoryMode</a> outOfMemoryMode=ThrowException)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_3">free</a> (void *ptr)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_4">freeAll</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_5">releaseMemory</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_6">~CHeapAllocator</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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_7">getBlockSize</a> (void *block)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_8">getCategory</a> (void *block)</td></tr>
+
+<tr><td colspan=2><br><h2>Implementation</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_0">allocate</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a587">size</a>, const char *sourceFile, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a05377.html#a3">line</a>, const char *category)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_1">reallocate</a> (void *ptr, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a587">size</a>, const char *sourceFile, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a05377.html#a3">line</a>, const char *category)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom>{ <br>
+&nbsp;&nbsp;<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory10">ReleaseHeaderSize</a> = 8,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory3">CategoryStringLength</a> = 8,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory1">BeginNodeMarkers</a> = '&lt;',
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory5">EndNodeMarkers</a> = '&gt;',
+<br>
+&nbsp;&nbsp;<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory11">UnallocatedMemory</a> = 0xba,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory12">UninitializedMemory</a> = 0xbc,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory4">DeletedMemory</a> = 0xbd,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory9">NameLength</a> = 32
+<br>
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom>{ <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_3NLMEMORY_1_1CHeapAllocatory6">FreeNodeBlockSize</a> = 128,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_3NLMEMORY_1_1CHeapAllocatory8">FreeNodeBlockSizeShift</a> = 7,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_3NLMEMORY_1_1CHeapAllocatory7">FreeNodeBlockSizeMask</a> = 0x7f
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom>{ <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory0">Align</a> = 8,
+<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory2">BlockDataSizeMin</a> = 1&lt;&lt;4
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom>{ <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_5NLMEMORY_1_1CHeapAllocatory13">UserDataBlockSizeMin</a> = sizeof(CFreeNode)
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_6">TCategoryString</a> [CategoryStringLength]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_7">checkFreeNode</a> (const <a class="el" href="a02614.html">CFreeNode</a> *current, bool stopOnError, bool recurse) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_8">checkNode</a> (const <a class="el" href="a02620.html">CNodeBegin</a> *current, <a class="el" href="a04558.html#a11">uint32</a> crc) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_9">checkNodeLB</a> (const <a class="el" href="a02616.html">CMainBlock</a> *mainBlock, const <a class="el" href="a02620.html">CNodeBegin</a> *previous, const <a class="el" href="a02620.html">CNodeBegin</a> *current, const <a class="el" href="a02620.html">CNodeBegin</a> *next, bool stopOnError) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_10">enterCriticalSection</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_11">enterCriticalSectionLB</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_12">enterCriticalSectionSB</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_13">erase</a> (<a class="el" href="a02614.html">CFreeNode</a> *<a class="el" href="a04223.html#a574">z</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_14">find</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>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_15">initEmptyBlock</a> (<a class="el" href="a02616.html">CMainBlock</a> &amp;mainBlock)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_16">insert</a> (<a class="el" href="a02614.html">CFreeNode</a> *<a class="el" href="a04223.html#a572">x</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_17">internalCheckHeap</a> (bool stopOnError) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_18">leaveCriticalSection</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_19">leaveCriticalSectionLB</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_20">leaveCriticalSectionSB</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_21">rotateLeft</a> (<a class="el" href="a02614.html">CFreeNode</a> *<a class="el" href="a04223.html#a572">x</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_22">rotateRight</a> (<a class="el" href="a02614.html">CFreeNode</a> *<a class="el" href="a04223.html#a572">x</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_23">splitNode</a> (<a class="el" href="a02620.html">CNodeBegin</a> *node, <a class="el" href="a04558.html#a15">uint</a> newSize)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_24">_AllocateCount</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_25">_AlwaysCheck</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">TBlockAllocationMode</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_26">_BlockAllocationMode</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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_27">_BlockCount</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_28">_FreeTreeRoot</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02616.html">CMainBlock</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_29">_MainBlockList</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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_30">_MainBlockSize</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02855.html">CMemoryMutex</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_31">_MutexLB</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_32">_Name</a> [NameLength]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02624.html">CNullNode</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_33">_NullNode</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">TOutOfMemoryMode</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_34">_OutOfMemoryMode</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_35">computeCRC32</a> (<a class="el" href="a04558.html#a11">uint32</a> &amp;crc, const void *<a class="el" href="a04223.html#a589">buffer</a>, unsigned int <a class="el" href="a04223.html#a577">count</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_36">evalMagicNumber</a> (const <a class="el" href="a02620.html">CNodeBegin</a> *node)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_37">getFirstNode</a> (<a class="el" href="a02616.html">CMainBlock</a> *mainBlock)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_38">getFirstNode</a> (const <a class="el" href="a02616.html">CMainBlock</a> *mainBlock)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_39">getFreeNode</a> (<a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_40">getFreeNode</a> (const <a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_41">getNextNode</a> (<a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_42">getNextNode</a> (const <a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_43">getNode</a> (<a class="el" href="a02614.html">CFreeNode</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_44">getNode</a> (const <a class="el" href="a02614.html">CFreeNode</a> *current)</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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_45">getNodeSize</a> (const <a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_46">isNodeBlack</a> (const <a class="el" href="a02614.html">CFreeNode</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_47">isNodeFree</a> (const <a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_48">isNodeLast</a> (const <a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_49">isNodeRed</a> (const <a class="el" href="a02614.html">CFreeNode</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_50">isNodeSmall</a> (const <a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_51">isNodeUsed</a> (const <a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_52">mergeNode</a> (<a class="el" href="a02620.html">CNodeBegin</a> *node)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_53">setNodeBlack</a> (<a class="el" href="a02614.html">CFreeNode</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_54">setNodeColor</a> (<a class="el" href="a02614.html">CFreeNode</a> *current, bool red)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_55">setNodeFree</a> (<a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_56">setNodeLast</a> (<a class="el" href="a02620.html">CNodeBegin</a> *current, bool last)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_57">setNodeRed</a> (<a class="el" href="a02614.html">CFreeNode</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_58">setNodeSize</a> (<a class="el" href="a02620.html">CNodeBegin</a> *current, <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>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_59">setNodeUsed</a> (<a class="el" href="a02620.html">CNodeBegin</a> *current)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>struct&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a></td></tr>
+
+<tr><td colspan=2><br><h2>Performance control</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_0">checkHeap</a> (bool stopOnError) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_1">debugAlwaysCheckMemory</a> (bool alwaysCheck)</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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_2">debugGetAllocatedMemoryByCategory</a> (const char *category) const </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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_3">debugGetDebugInfoSize</a> () const </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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_4">debugGetLBDebugInfoSize</a> () const </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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_5">debugGetSBDebugInfoSize</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_6">debugIsAlwaysCheckMemory</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_7">debugReportMemoryLeak</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_8">debugStatisticsReport</a> (const char *stateFile, bool memoryMap)</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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_9">getAllocatedMemory</a> () const </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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_10">getAllocatedSystemMemoryByAllocator</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">TBlockAllocationMode</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_11">getBlockAllocationMode</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_12">getFragmentationRatio</a> () const </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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_13">getFreeMemory</a> () const </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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_14">getMainBlockCount</a> () const </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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_15">getMainBlockSize</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_16">getName</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">TOutOfMemoryMode</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_17">getOutOfMemoryMode</a> () const </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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_18">getSmallBlockMemory</a> () const </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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_19">getTotalMemoryUsed</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_20">setBlockAllocationMode</a> (<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">TBlockAllocationMode</a> mode)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_21">setMainBlockCount</a> (<a class="el" href="a04558.html#a15">uint</a> blockCount)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_22">setMainBlockSize</a> (<a class="el" href="a04558.html#a15">uint</a> mainBlockSize)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_23">setName</a> (const char *name)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_24">setOutOfMemoryHook</a> (void(*outOfMemoryCallback)())</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_25">setOutOfMemoryMode</a> (<a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">TOutOfMemoryMode</a> mode)</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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_26">getAllocatedSystemMemory</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Category control</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_0">debugPopCategoryString</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_1">debugPushCategoryString</a> (const char *str)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02856.html">CMemoryTDS</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_2">_CategoryStack</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_3">_OutOfMemoryCallback</a> )()</td></tr>
+
+<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Overridable</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1218_0">allocateBlock</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>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1218_1">freeBlock</a> (<a class="el" href="a04558.html#a7">uint8</a> *block)</td></tr>
+
+<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
+</table>
+<hr><h2>Member Typedef Documentation</h2>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_6" doxytag="NLMEMORY::CHeapAllocator::TCategoryString" ></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"> typedef char <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_6">NLMEMORY::CHeapAllocator::TCategoryString</a>[CategoryStringLength]<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="a05777.html#l00220">220</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_2" doxytag="NLMEMORY::CHeapAllocator::@42" ></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"> anonymous enum<code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory10" doxytag="ReleaseHeaderSize" ></a>ReleaseHeaderSize</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory3" doxytag="CategoryStringLength" ></a>CategoryStringLength</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory1" doxytag="BeginNodeMarkers" ></a>BeginNodeMarkers</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory5" doxytag="EndNodeMarkers" ></a>EndNodeMarkers</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory11" doxytag="UnallocatedMemory" ></a>UnallocatedMemory</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory12" doxytag="UninitializedMemory" ></a>UninitializedMemory</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory4" doxytag="DeletedMemory" ></a>DeletedMemory</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory9" doxytag="NameLength" ></a>NameLength</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05777.html#l00208">208</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>.
+<p>
+<div class="fragment"><pre>00209 {
+00210 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory10">ReleaseHeaderSize</a> = 8,
+00211 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory3">CategoryStringLength</a> = 8,
+00212 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory1">BeginNodeMarkers</a> = <span class="charliteral">'&lt;'</span>,
+00213 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory5">EndNodeMarkers</a> = <span class="charliteral">'&gt;'</span>,
+00214 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory11">UnallocatedMemory</a> = 0xba,
+00215 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory12">UninitializedMemory</a> = 0xbc,
+00216 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory4">DeletedMemory</a> = 0xbd,
+00217 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory9">NameLength</a> = 32
+00218 };
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_3" doxytag="NLMEMORY::CHeapAllocator::@43" ></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"> anonymous enum<code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_3NLMEMORY_1_1CHeapAllocatory6" doxytag="FreeNodeBlockSize" ></a>FreeNodeBlockSize</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_3NLMEMORY_1_1CHeapAllocatory8" doxytag="FreeNodeBlockSizeShift" ></a>FreeNodeBlockSizeShift</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_3NLMEMORY_1_1CHeapAllocatory7" doxytag="FreeNodeBlockSizeMask" ></a>FreeNodeBlockSizeMask</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05777.html#l00253">253</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>.
+<p>
+<div class="fragment"><pre>00254 {
+00255 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_3NLMEMORY_1_1CHeapAllocatory6">FreeNodeBlockSize</a> = 128,
+00256 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_3NLMEMORY_1_1CHeapAllocatory8">FreeNodeBlockSizeShift</a> = 7,
+00257 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_3NLMEMORY_1_1CHeapAllocatory7">FreeNodeBlockSizeMask</a> = 0x7f
+00258 };
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_4" doxytag="NLMEMORY::CHeapAllocator::@44" ></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"> anonymous enum<code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory0" doxytag="Align" ></a>Align</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory2" doxytag="BlockDataSizeMin" ></a>BlockDataSizeMin</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05777.html#l00261">261</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>.
+<p>
+<div class="fragment"><pre>00262 {
+00263 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory0">Align</a> = 8,
+00264 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory2">BlockDataSizeMin</a> = 1&lt;&lt;4
+00265 };
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_5" doxytag="NLMEMORY::CHeapAllocator::@45" ></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"> anonymous enum<code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_5NLMEMORY_1_1CHeapAllocatory13" doxytag="UserDataBlockSizeMin" ></a>UserDataBlockSizeMin</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05777.html#l00379">379</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>.
+<p>
+<div class="fragment"><pre>00380 {
+00381 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_5NLMEMORY_1_1CHeapAllocatory13">UserDataBlockSizeMin</a> = <span class="keyword">sizeof</span>(CFreeNode)
+00382 };
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_0" doxytag="NLMEMORY::CHeapAllocator::@46" ></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"> anonymous enum
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw6" doxytag="SmallBlockGranularityShift" ></a>SmallBlockGranularityShift</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw5" doxytag="SmallBlockGranularity" ></a>SmallBlockGranularity</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw1" doxytag="FirstSmallBlock" ></a>FirstSmallBlock</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw3" doxytag="LastSmallBlock" ></a>LastSmallBlock</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw7" doxytag="SmallBlockPoolSize" ></a>SmallBlockPoolSize</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05777.html#l00451">451</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>.
+<p>
+<div class="fragment"><pre>00452 {
+00453 <span class="comment">// Small block granularity</span>
+00454 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw6">SmallBlockGranularityShift</a> = 3,
+00455
+00456 <span class="comment">// Small block granularity</span>
+00457 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw5">SmallBlockGranularity</a> = 1&lt;&lt;<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw6">SmallBlockGranularityShift</a>,
+00458
+00459 <span class="comment">// Smallest block size</span>
+00460 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw1">FirstSmallBlock</a> = 8,
+00461
+00462 <span class="comment">// Largest block size</span>
+00463 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw3">LastSmallBlock</a> = 128,
+00464
+00465 <span class="comment">// Size of a smallblock pool</span>
+00466 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw7">SmallBlockPoolSize</a> = 20
+00467 };
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_0" doxytag="NLMEMORY::CHeapAllocator::TBlockAllocationMode" ></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"> enum <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">NLMEMORY::CHeapAllocator::TBlockAllocationMode</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Block allocation mode.<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_0NLMEMORY_1_1CHeapAllocatorw2" doxytag="Grow" ></a>Grow</em>&nbsp;</td><td>
+When the allocator runs out of memory, allocate a new block. </td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_0NLMEMORY_1_1CHeapAllocatorw0" doxytag="DontGrow" ></a>DontGrow</em>&nbsp;</td><td>
+When the allocator runs out of memory, returns a out of memory signal. </td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05777.html#l00072">72</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>.
+<p>
+<div class="fragment"><pre>00073 {
+00075 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0NLMEMORY_1_1CHeapAllocatorw2">Grow</a>,
+00076
+00078 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0NLMEMORY_1_1CHeapAllocatorw0">DontGrow</a>
+00079 };
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_1" doxytag="NLMEMORY::CHeapAllocator::TOutOfMemoryMode" ></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"> enum <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">NLMEMORY::CHeapAllocator::TOutOfMemoryMode</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Out of memory signal<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_1NLMEMORY_1_1CHeapAllocatorw8" doxytag="ThrowException" ></a>ThrowException</em>&nbsp;</td><td>
+When the allocator runs out of memory, throw an exception. </td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_1NLMEMORY_1_1CHeapAllocatorw4" doxytag="ReturnNull" ></a>ReturnNull</em>&nbsp;</td><td>
+When the allocator runs out of memory, returns NULL. </td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05777.html#l00084">84</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>.
+<p>
+<div class="fragment"><pre>00085 {
+00087 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1NLMEMORY_1_1CHeapAllocatorw8">ThrowException</a>,
+00088
+00090 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1NLMEMORY_1_1CHeapAllocatorw4">ReturnNull</a>
+00091 };
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_2" doxytag="NLMEMORY::CHeapAllocator::CHeapAllocator" ></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"> NLMEMORY::CHeapAllocator::CHeapAllocator </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>mainBlockSize</em> = 1024 *1024 *10, </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>blockCount</em> = 1, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">TBlockAllocationMode</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>blockAllocationMode</em> = Grow, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">TOutOfMemoryMode</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>outOfMemoryMode</em> = ThrowException</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>
+Constructor / Destructor
+<p>
+Definition at line <a class="el" href="a05775.html#l00936">936</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05983.html#l00072">NLMEMORY::line</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00961 {
+00962 <span class="comment">// Fill informations for the second part of the node</span>
+00963
+00964 <span class="comment">// Get the freeNode</span>
+00965 freeNode = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_40">getFreeNode</a> (rest);
+00966
+00967 <span class="comment">// Insert the free node</span>
+00968 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_16">insert</a> (freeNode);
+00969
+00970 <span class="comment">// Crc node</span>
+00971 <a class="code" href="a04356.html#a1">NL_UPDATE_MAGIC_NUMBER</a> (rest);
+00972 }
+00973
+00974 <span class="comment">// Check the node size</span>
+00975 <a class="code" href="a04356.html#a0">internalAssert</a> ( <a class="code" href="a04223.html#a587">size</a> &lt;= getNodeSize (node) );
+00976 <a class="code" href="a04356.html#a0">internalAssert</a> ( std::max ((<a class="code" href="a04558.html#a15">uint</a>)BlockDataSizeMin, <a class="code" href="a04223.html#a587">size</a> + (uint)Align) + <span class="keyword">sizeof</span> (CNodeBegin) + <span class="keyword">sizeof</span> (CNodeEnd) + <span class="keyword">sizeof</span> (CNodeBegin) + <span class="keyword">sizeof</span> (CNodeEnd) + BlockDataSizeMin &gt;= getNodeSize (node) );
+00977
+00978 <span class="comment">// Check pointer alignment</span>
+00979 <a class="code" href="a04356.html#a0">internalAssert</a> (((<a class="code" href="a04558.html#a11">uint32</a>)node&amp;(Align-1)) == 0);
+00980 <a class="code" href="a04356.html#a0">internalAssert</a> (((<a class="code" href="a04558.html#a11">uint32</a>)((<span class="keywordtype">char</span>*)node + <span class="keyword">sizeof</span>(CNodeBegin))&amp;(Align-1)) == 0);
+00981
+00982 <span class="comment">// Check size</span>
+00983 <a class="code" href="a04356.html#a0">internalAssert</a> ((<a class="code" href="a04558.html#a11">uint32</a>)node-&gt;EndMagicNumber &lt;= (<a class="code" href="a04558.html#a11">uint32</a>)((<a class="code" href="a04558.html#a7">uint8</a>*)node+<span class="keyword">sizeof</span>(CNodeBegin)+<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_45">getNodeSize</a> (node) ));
+00984 <a class="code" href="a04356.html#a0">internalAssert</a> ((uint32)node-&gt;EndMagicNumber &gt; (uint32)(((uint8*)node+<span class="keyword">sizeof</span>(CNodeBegin)+<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_45">getNodeSize</a> (node) ) - BlockDataSizeMin - BlockDataSizeMin - <span class="keyword">sizeof</span>(CNodeBegin) - <span class="keyword">sizeof</span>(CNodeEnd)));
+00985
+00986 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_19">leaveCriticalSectionLB</a> ();
+00987
+00988 <span class="comment">// Return the user pointer</span>
+00989 <span class="keywordflow">return</span> (<span class="keywordtype">void</span>*)((<a class="code" href="a04558.html#a15">uint</a>)node + <span class="keyword">sizeof</span> (CNodeBegin));
+00990 }
+00991 <span class="keywordflow">else</span>
+00992 {
+00993 <span class="comment">// ********</span>
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_6" doxytag="NLMEMORY::CHeapAllocator::~CHeapAllocator" ></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"> NLMEMORY::CHeapAllocator::~<a class="el" href="a02610.html">CHeapAllocator</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><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Destruction
+<p>
+Definition at line <a class="el" href="a05775.html#l00997">997</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05779.html#l00060">NL_ALLOC_STOP</a>.
+<p>
+<div class="fragment"><pre>01006 {
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_0" doxytag="NLMEMORY::CHeapAllocator::allocate" ></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 * NLMEMORY::CHeapAllocator::allocate </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>size</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>sourceFile</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>line</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>category</em></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>
+
+<p>
+Definition at line <a class="el" href="a05775.html#l01527">1527</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05983.html#l00067">NLMEMORY::__declspec()</a>.
+<p>
+<div class="fragment"><pre>01528 {
+01529 catMap = CCategoryMap::insert (current-&gt;Category, catMap);
+01530 cat = catMap;
+01531 }
+01532 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_45">getNodeSize</a> (current) + <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory10">ReleaseHeaderSize</a>;
+01533 cat-&gt;BlockCount++;
+01534 cat-&gt;Size += <a class="code" href="a04223.html#a587">size</a>;
+01535 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a587">size</a> &lt; cat-&gt;Min)
+01536 cat-&gt;Min = <a class="code" href="a04223.html#a587">size</a>;
+01537 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a587">size</a> &gt; cat-&gt;Max)
+01538 cat-&gt;Max = <a class="code" href="a04223.html#a587">size</a>;
+01539 }
+01540
+01541 <span class="comment">// Next node</span>
+01542 current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_42">getNextNode</a> (current);
+01543 largeBlockCount++;
+01544 }
+01545
+01546 <span class="comment">// Next block</span>
+01547 currentBlock = currentBlock-&gt;Next;
+01548 }
+01549
+01550 <span class="comment">// Write the heap info file</span>
+01551 fprintf (file, <span class="stringliteral">"HEAP STATISTICS\n"</span>);
+01552 fprintf (file, <span class="stringliteral">"HEAP, TOTAL MEMORY USED, ALLOCATED MEMORY, FREE MEMORY, FRAGMENTATION RATIO, MAIN BLOCK SIZE, MAIN BLOCK COUNT\n"</span>);
+01553
+01554 fprintf (file, <span class="stringliteral">"%s, %d, %d, %d, %f%%, %d, %d\n"</span>, _Name, getTotalMemoryUsed (),
+01555 getAllocatedMemory (), getFreeMemory (), 100.f*getFragmentationRatio (), getMainBlockSize (), getMainBlockCount ());
+01556
+01557 fprintf (file, <span class="stringliteral">"\n\nHEAP BLOCKS\n"</span>);
+01558 fprintf (file, <span class="stringliteral">"SMALL BLOCK MEMORY, SMALL BLOCK COUNT, LARGE BLOCK COUNT\n"</span>);
+01559
+01560 fprintf (file, <span class="stringliteral">"%d, %d, %d\n"</span>, getSmallBlockMemory (), smallBlockCount, largeBlockCount);
+01561
+01562 fprintf (file, <span class="stringliteral">"\n\nHEAP DEBUG INFOS\n"</span>);
+01563 fprintf (file, <span class="stringliteral">"SB DEBUG INFO, LB DEBUG INFO, TOTAL DEBUG INFO\n"</span>);
+01564
+01565 fprintf (file, <span class="stringliteral">"%d, %d, %d\n"</span>, debugGetSBDebugInfoSize (), debugGetLBDebugInfoSize (), debugGetDebugInfoSize ());
+01566
+01567 <span class="comment">// **************************</span>
+01568
+01569 <span class="comment">// Write the system heap info file</span>
+01570 <a class="code" href="a04558.html#a15">uint</a> systemMemory = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_26">getAllocatedSystemMemory</a> ();
+01571 <a class="code" href="a04558.html#a15">uint</a> hookedSystemMemory = GetAllocatedSystemMemoryHook ();
+01572 <a class="code" href="a04558.html#a15">uint</a> nelSystemMemory = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1217_10">getAllocatedSystemMemoryByAllocator</a> ();
+01573
+01574 fprintf (file, <span class="stringliteral">"\n\nSYSTEM HEAP STATISTICS\n"</span>);
+01575 fprintf (file, <span class="stringliteral">"SYSTEM HEAP ALLOCATED MEMORY, TOTAL HOOKED MEMORY, NEL ALLOCATED MEMORY, OTHER ALLOCATED MEMORY, NOT HOOKED MEMORY\n"</span>);
+01576 fprintf (file, <span class="stringliteral">"%d, %d, %d, %d, %d\n"</span>, systemMemory, hookedSystemMemory, nelSystemMemory, hookedSystemMemory-nelSystemMemory, systemMemory-hookedSystemMemory);
+01577
+01578 <span class="comment">// **************************</span>
+01579
+01580 <span class="comment">// Write the category map file</span>
+01581 fprintf (file, <span class="stringliteral">"\n\n\nCATEGORY STATISTICS\n"</span>);
+01582 fprintf (file, <span class="stringliteral">"CATEGORY, BLOCK COUNT, MEMORY ALLOCATED, MIN BLOCK SIZE, MAX BLOCK SIZE, AVERAGE BLOCK SIZE, SB COUNT 8, SB COUNT 16, SB COUNT 24, SB COUNT 32, SB COUNT 40, SB COUNT 48, SB COUNT 56, SB COUNT 64, SB COUNT 72, SB COUNT 80, SB COUNT 88, SB COUNT 96, SB COUNT 104, SB COUNT 112, SB COUNT 120, SB COUNT 128\n"</span>);
+01583
+01584 CCategoryMap *cat = catMap;
+01585 <span class="keywordflow">while</span> (cat)
+01586 {
+01587 CCategoryMap *next = cat-&gt;Next;
+01588
+01589 <span class="comment">// Number of small blocks</span>
+01590 <a class="code" href="a04558.html#a15">uint</a> smallB[<a class="code" href="a04354.html#a3">NL_SMALLBLOCK_COUNT</a>];
+01591
+01592 <span class="comment">// Clean</span>
+01593 <a class="code" href="a04558.html#a15">uint</a> smallBlock;
+01594 <span class="keywordflow">for</span> (smallBlock=0; smallBlock&lt;<a class="code" href="a04354.html#a3">NL_SMALLBLOCK_COUNT</a>; smallBlock++)
+01595 {
+01596 smallB[smallBlock] = 0;
+01597 }
+01598
+01599 <span class="comment">// Scan small block for this category</span>
+01600 currentSB = (CSmallBlockPool *)<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_6">_SmallBlockPool</a>;
+01601 <span class="keywordflow">while</span> (currentSB)
+01602 {
+01603 <span class="comment">// For each node in this small block pool</span>
+01604 <a class="code" href="a04558.html#a15">uint</a> block;
+01605 <span class="keywordflow">for</span> (block=0; block&lt;<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw7">SmallBlockPoolSize</a>; block++)
+01606 {
+01607 <span class="comment">// Get the node</span>
+01608 <span class="keyword">const</span> <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_8">getSmallBlock</a> (currentSB, block);
+01609
+01610 <span class="comment">// Node allocated ?</span>
+01611 <span class="keywordflow">if</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_51">isNodeUsed</a> (current))
+01612 {
+01613 <span class="comment">// Good node ?</span>
+01614 <span class="keywordflow">if</span> (strcmp (current-&gt;Category, cat-&gt;Name) == 0)
+01615 {
+01616 <span class="comment">// Get the small block index</span>
+01617 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a> = <a class="code" href="a04354.html#a4">NL_SIZE_TO_SMALLBLOCK_INDEX</a> (getNodeSize (current));
+01618
+01619 <span class="comment">// One more node</span>
+01620 smallB[<a class="code" href="a04223.html#a566">index</a>]++;
+01621 }
+01622 }
+01623 }
+01624
+01625 <span class="comment">// Next block</span>
+01626 currentSB = currentSB-&gt;Next;
+01627 }
+01628
+01629 <span class="comment">// Average</span>
+01630 <a class="code" href="a04558.html#a15">uint</a> average = cat-&gt;Size / cat-&gt;BlockCount;
+01631
+01632 <span class="comment">// Print the line</span>
+01633 fprintf (file, <span class="stringliteral">"%s, %d, %d, %d, %d, %d"</span>, cat-&gt;Name, cat-&gt;BlockCount, cat-&gt;Size,
+01634 cat-&gt;Min, cat-&gt;Max, average);
+01635
+01636 <span class="comment">// Print small blocks</span>
+01637 <span class="keywordflow">for</span> (smallBlock=0; smallBlock&lt;<a class="code" href="a04354.html#a3">NL_SMALLBLOCK_COUNT</a>; smallBlock++)
+01638 {
+01639 fprintf (file, <span class="stringliteral">", %d"</span>, smallB[smallBlock]);
+01640 }
+01641
+01642 fprintf (file, <span class="stringliteral">"\n"</span>);
+01643
+01644 <span class="keyword">delete</span> cat;
+01645 cat = next;
+01646 }
+01647
+01648 <span class="comment">// **************************</span>
+01649
+01650 <span class="comment">// Write the small block statistics</span>
+01651 fprintf (file, <span class="stringliteral">"\n\n\nSMALL BLOCK STATISTICS\n"</span>);
+01652 fprintf (file, <span class="stringliteral">"SIZE, BLOCK COUNT, BLOCK FREE, BLOCK USED, TOTAL MEMORY USED\n"</span>);
+01653
+01654 <span class="comment">// Number of small blocks</span>
+01655 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a>[<a class="code" href="a04354.html#a3">NL_SMALLBLOCK_COUNT</a>];
+01656 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_3">free</a>[<a class="code" href="a04354.html#a3">NL_SMALLBLOCK_COUNT</a>];
+01657
+01658 <a class="code" href="a04558.html#a15">uint</a> smallBlock;
+01659 <span class="keywordflow">for</span> (smallBlock=0; smallBlock&lt;<a class="code" href="a04354.html#a3">NL_SMALLBLOCK_COUNT</a>; smallBlock++)
+01660 {
+01661 <a class="code" href="a04223.html#a577">count</a>[smallBlock] = 0;
+01662 free[smallBlock] = 0;
+01663 }
+01664
+01665 <span class="comment">// For each small block</span>
+01666 currentSB = (CSmallBlockPool *)<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_6">_SmallBlockPool</a>;
+01667 <span class="keywordflow">while</span> (currentSB)
+01668 {
+01669 <span class="comment">// For each node in this small block pool</span>
+01670 <a class="code" href="a04558.html#a15">uint</a> block;
+01671 <span class="keywordflow">for</span> (block=0; block&lt;<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw7">SmallBlockPoolSize</a>; block++)
+01672 {
+01673 <span class="comment">// Get the node</span>
+01674 <span class="keyword">const</span> <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_8">getSmallBlock</a> (currentSB, block);
+01675
+01676 <span class="comment">// Get the small block index</span>
+01677 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a> = <a class="code" href="a04354.html#a4">NL_SIZE_TO_SMALLBLOCK_INDEX</a> (getNodeSize (current));
+01678
+01679 <span class="comment">// Add a block</span>
+01680 <a class="code" href="a04223.html#a577">count</a>[<a class="code" href="a04223.html#a566">index</a>]++;
+01681
+01682 <span class="comment">// Node allocated ?</span>
+01683 <span class="keywordflow">if</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_47">isNodeFree</a> (current))
+01684 {
+01685 <span class="comment">// Add a free block</span>
+01686 free[<a class="code" href="a04223.html#a566">index</a>]++;
+01687 }
+01688
+01689 <span class="comment">// Next node</span>
+01690 current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_42">getNextNode</a> (current);
+01691 }
+01692
+01693 <span class="comment">// Next block</span>
+01694 currentSB = currentSB-&gt;Next;
+01695 }
+01696
+01697 <span class="comment">// Print stats</span>
+01698 <span class="keywordflow">for</span> (smallBlock=0; smallBlock&lt;<a class="code" href="a04354.html#a3">NL_SMALLBLOCK_COUNT</a>; smallBlock++)
+01699 {
+01700 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = (smallBlock+1)*<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw5">SmallBlockGranularity</a>;
+01701 fprintf (file,<span class="stringliteral">"%d, %d, %d, %d, %d\n"</span>,size, count[smallBlock], free[smallBlock],
+01702 count[smallBlock]-free[smallBlock], count[smallBlock]*(<span class="keyword">sizeof</span> (CNodeBegin) + size + NL_HEAP_NODE_END_SIZE));
+01703 }
+01704
+01705 <span class="comment">// **************************</span>
+01706
+01707 <span class="comment">// Write the memory map file</span>
+01708 <span class="keywordflow">if</span> (memoryMap)
+01709 {
+01710 fprintf (file, <span class="stringliteral">"\n\n\nHEAP LARGE BLOCK DUMP\n"</span>);
+01711 fprintf (file, <span class="stringliteral">"ADDRESS, SIZE, CATEGORY, HEAP, STATE, SOURCE, LINE\n"</span>);
+01712
+01713 <span class="comment">// For each main block</span>
+01714 currentBlock = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_29">_MainBlockList</a>;
+01715 <span class="keywordflow">while</span> (currentBlock)
+01716 {
+01717 <span class="comment">// Get the first node</span>
+01718 <span class="keyword">const</span> <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_38">getFirstNode</a> (currentBlock);
+01719 <span class="keywordflow">while</span> (current)
+01720 {
+01721 <span class="comment">// Write the entry</span>
+01722 fprintf (file, <span class="stringliteral">"0x%08x, %d, %s, %s, %s, %s, %d\n"</span>, (<a class="code" href="a04558.html#a15">uint</a>)current + <span class="keyword">sizeof</span>(CNodeBegin),
+01723 getNodeSize (current), current-&gt;Category, _Name,
+01724 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_47">isNodeFree</a> (current)?<span class="stringliteral">"free"</span>:<span class="stringliteral">"used"</span>, current-&gt;File, current-&gt;Line);
+01725
+01726 <span class="comment">// Next node</span>
+01727 current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_42">getNextNode</a> (current);
+01728 }
+01729
+01730 <span class="comment">// Next block</span>
+01731 currentBlock = currentBlock-&gt;Next;
+01732 }
+01733 }
+01734
+01735 <span class="comment">// File created successfuly</span>
+01736 status = <span class="keyword">true</span>;
+01737 }
+01738
+01739 <span class="comment">// Close</span>
+01740 <span class="keywordflow">if</span> (<a class="code" href="a04115.html#a95">file</a>)
+01741 fclose (file);
+01742
+01743 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_0">debugPopCategoryString</a> ();
+01744
+01745 <span class="keywordflow">return</span> status;
+01746 }
+01747 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01748 <span class="preprocessor"></span>
+01749 <span class="comment">// *********************************************************</span>
+01750
+01751 <a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::getFreeMemory ()<span class="keyword"> const</span>
+01752 <span class="keyword"></span>{
+01753 enterCriticalSection ();
+01754
+01755 <span class="comment">// Sum free memory</span>
+01756 <a class="code" href="a04558.html#a15">uint</a> memory = 0;
+01757
+01758 <span class="comment">// For each small block</span>
+01759 CSmallBlockPool *currentSB = (CSmallBlockPool *)_SmallBlockPool;
+01760 <span class="keywordflow">while</span> (currentSB)
+01761 {
+01762 <span class="comment">// For each node in this small block pool</span>
+01763 <a class="code" href="a04558.html#a15">uint</a> block;
+01764 <span class="keywordflow">for</span> (block=0; block&lt;SmallBlockPoolSize; block++)
+01765 {
+01766 <span class="comment">// Get the node</span>
+01767 <span class="keyword">const</span> CNodeBegin *current = getSmallBlock (currentSB, block);
+01768
+01769 <span class="comment">// Node allocated ?</span>
+01770 <span class="keywordflow">if</span> (isNodeFree (current))
+01771 memory += getNodeSize (current) + ReleaseHeaderSize;
+01772
+01773 <span class="comment">// Next node</span>
+01774 current = getNextNode (current);
+01775 }
+01776
+01777 <span class="comment">// Next block</span>
+01778 currentSB = currentSB-&gt;Next;
+01779 }
+01780
+01781 <span class="comment">// For each main block</span>
+01782 CMainBlock *currentBlock = _MainBlockList;
+01783 <span class="keywordflow">while</span> (currentBlock)
+01784 {
+01785 <span class="comment">// Get the first node</span>
+01786 <span class="keyword">const</span> CNodeBegin *current = getFirstNode (currentBlock);
+01787 <span class="keywordflow">while</span> (current)
+01788 {
+01789 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01790 <span class="preprocessor"></span> <span class="comment">// Check node</span>
+01791 checkNode (current, evalMagicNumber (current));
+01792 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01793 <span class="preprocessor"></span>
+01794 <span class="comment">// Node allocated ?</span>
+01795 <span class="keywordflow">if</span> (isNodeFree (current))
+01796 memory += getNodeSize (current) + ReleaseHeaderSize;
+01797
+01798 <span class="comment">// Next node</span>
+01799 current = getNextNode (current);
+01800 }
+01801
+01802 <span class="comment">// Next block</span>
+01803 currentBlock = currentBlock-&gt;Next;
+01804 }
+01805
+01806 leaveCriticalSection ();
+01807
+01808 <span class="comment">// Return memory used</span>
+01809 <span class="keywordflow">return</span> memory;
+01810 }
+01811
+01812 <span class="comment">// *********************************************************</span>
+01813
+01814 <a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::getTotalMemoryUsed ()<span class="keyword"> const</span>
+01815 <span class="keyword"></span>{
+01816 enterCriticalSection ();
+01817
+01818 <span class="comment">// Sum total memory</span>
+01819 <a class="code" href="a04558.html#a15">uint</a> memory = 0;
+01820
+01821 <span class="comment">// For each main block</span>
+01822 CMainBlock *currentBlock = _MainBlockList;
+01823 <span class="keywordflow">while</span> (currentBlock)
+01824 {
+01825 <span class="comment">// Get block size</span>
+01826 memory += currentBlock-&gt;Size;
+01827
+01828 <span class="comment">// Sum the arrays</span>
+01829 memory += <span class="keyword">sizeof</span> (CMainBlock);
+01830
+01831 <span class="comment">// Next block</span>
+01832 currentBlock = currentBlock-&gt;Next;
+01833 }
+01834
+01835 leaveCriticalSection ();
+01836
+01837 <span class="comment">// Return the memory</span>
+01838 <span class="keywordflow">return</span> memory;
+01839 }
+01840
+01841 <span class="comment">// *********************************************************</span>
+01842
+01843 <a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::getSmallBlockMemory ()<span class="keyword"> const</span>
+01844 <span class="keyword"></span>{
+01845 enterCriticalSection ();
+01846
+01847 <span class="comment">// Sum total memory</span>
+01848 <a class="code" href="a04558.html#a15">uint</a> memory = 0;
+01849
+01850 <span class="comment">// For each small block</span>
+01851 CSmallBlockPool *currentSB = (CSmallBlockPool *)_SmallBlockPool;
+01852 <span class="keywordflow">while</span> (currentSB)
+01853 {
+01854 <span class="comment">// Get block size</span>
+01855 memory += <span class="keyword">sizeof</span>(CSmallBlockPool) + SmallBlockPoolSize * (<span class="keyword">sizeof</span>(CNodeBegin) + currentSB-&gt;Size +
+01856 <a class="code" href="a04354.html#a2">NL_HEAP_NODE_END_SIZE</a>);
+01857
+01858 <span class="comment">// Next block</span>
+01859 currentSB = currentSB-&gt;Next;
+01860 }
+01861
+01862 leaveCriticalSection ();
+01863
+01864 <span class="comment">// Return the memory</span>
+01865 <span class="keywordflow">return</span> memory;
+01866 }
+01867
+01868 <span class="comment">// *********************************************************</span>
+01869
+01870 <span class="keywordtype">float</span> CHeapAllocator::getFragmentationRatio ()<span class="keyword"> const</span>
+01871 <span class="keyword"></span>{
+01872 enterCriticalSection ();
+01873
+01874 <span class="comment">// Sum free and used node</span>
+01875 <span class="keywordtype">float</span> free = 0;
+01876 <span class="keywordtype">float</span> used = 0;
+01877
+01878 <span class="comment">// For each main block</span>
+01879 CMainBlock *currentBlock = _MainBlockList;
+01880 <span class="keywordflow">while</span> (currentBlock)
+01881 {
+01882 <span class="comment">// Get the first node</span>
+01883 <span class="keyword">const</span> CNodeBegin *current = getFirstNode (currentBlock);
+01884 <span class="keywordflow">while</span> (current)
+01885 {
+01886 <span class="comment">// Node allocated ?</span>
+01887 <span class="keywordflow">if</span> (isNodeUsed (current))
+01888 used++;
+01889 <span class="keywordflow">else</span>
+01890 free++;
+01891
+01892 <span class="comment">// Next node</span>
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1218_0" doxytag="NLMEMORY::CHeapAllocator::allocateBlock" ></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#a7">uint8</a> * NLMEMORY::CHeapAllocator::allocateBlock </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><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Method used to allocate system memory
+<p>
+Definition at line <a class="el" href="a05775.html#l03038">3038</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_7" doxytag="NLMEMORY::CHeapAllocator::checkFreeNode" ></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"> bool NLMEMORY::CHeapAllocator::checkFreeNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>current</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>stopOnError</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>recurse</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [inline, private]</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="a05775.html#l00640">640</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00652 {
+00653 <span class="comment">// Check size is valid</span>
+00654 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a587">size</a> != 0)
+00655 {
+00656 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+00657 <span class="preprocessor"></span> <span class="comment">// If category is NULL</span>
+00658 <span class="keywordflow">if</span> (category == NULL)
+00659 {
+00660 <span class="comment">// Get the current category</span>
+00661 CCategory *cat = (CCategory*)<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_2">_CategoryStack</a>.getPointer ();
+00662 <span class="keywordflow">if</span> (cat)
+00663 {
+00664 category = cat-&gt;Name;
+00665 }
+00666 <span class="keywordflow">else</span>
+00667 {
+00668 <span class="comment">// Not yet initialised</span>
+00669 category = <a class="code" href="a04352.html#a3">NL_HEAP_UNKNOWN_CATEGORY</a>;
+00670 }
+00671 }
+00672
+00673 <span class="comment">/* trap debug if (strcmp(category,"3dIns") == 0)</span>
+00674 <span class="comment"> {</span>
+00675 <span class="comment"> n3dDrvTotal += size;</span>
+00676 <span class="comment"> uint dbg= 0;</span>
+00677 <span class="comment"> dbg++;</span>
+00678 <span class="comment"> }</span>
+00679 <span class="comment"> */</span>
+00680
+00681 <span class="comment">// Checks ?</span>
+00682 <span class="keywordflow">if</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_25">_AlwaysCheck</a>)
+00683 {
+00684 <span class="comment">// Check heap integrity</span>
+00685 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_17">internalCheckHeap</a> (<span class="keyword">true</span>);
+00686 }
+00687
+00688 <span class="comment">// Check breakpoints</span>
+00689 <span class="comment">/*if (_Breakpoints.find (_AllocateCount) != _Breakpoints.end())</span>
+00690 <span class="comment"> {</span>
+00691 <span class="comment"> // ********</span>
+00692 <span class="comment"> // * STOP *</span>
+00693 <span class="comment"> // ********</span>
+00694 <span class="comment"> // * Breakpoints allocation</span>
+00695 <span class="comment"> // ********</span>
+00696 <span class="comment"> NL_ALLOC_STOP;</span>
+00697 <span class="comment"> }*/</span>
+00698 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+00699 <span class="preprocessor"></span>
+00700 <span class="comment">// Small or largs block ?</span>
+00701 <span class="preprocessor">#ifdef NL_HEAP_NO_SMALL_BLOCK_OPTIMIZATION</span>
+00702 <span class="preprocessor"></span> <span class="keywordflow">if</span> (0)
+00703 <span class="preprocessor">#else // NL_HEAP_NO_SMALL_BLOCK_OPTIMIZATION</span>
+00704 <span class="preprocessor"></span> <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a587">size</a> &lt;= <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw3">LastSmallBlock</a>)
+00705 <span class="preprocessor">#endif// NL_HEAP_NO_SMALL_BLOCK_OPTIMIZATION</span>
+00706 <span class="preprocessor"></span> {
+00707 <span class="comment">// *******************</span>
+00708 <span class="comment">// Small block</span>
+00709 <span class="comment">// *******************</span>
+00710
+00711 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_12">enterCriticalSectionSB</a> ();
+00712
+00713 <span class="comment">// Get pointer on the free block list</span>
+00714 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> **freeNode = (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> **)<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_4">_FreeSmallBlocks</a>+<a class="code" href="a04354.html#a4">NL_SIZE_TO_SMALLBLOCK_INDEX</a> (<a class="code" href="a04223.html#a587">size</a>);
+00715
+00716 <span class="comment">// Not found ?</span>
+00717 <span class="keywordflow">if</span> (*freeNode == NULL)
+00718 {
+00719 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_20">leaveCriticalSectionSB</a> ();
+00720
+00721 <span class="comment">// Size must be aligned</span>
+00722 <a class="code" href="a04558.html#a15">uint</a> alignedSize = <a class="code" href="a04354.html#a5">NL_ALIGN_SIZE_FOR_SMALLBLOCK</a> (<a class="code" href="a04223.html#a587">size</a>);
+00723
+00724 <span class="comment">// Use internal allocator</span>
+00725 CSmallBlockPool *smallBlock = (CSmallBlockPool *)<a class="code" href="a04354.html#a0">NelAlloc</a> (*<span class="keyword">this</span>, <span class="keyword">sizeof</span>(CSmallBlockPool) + SmallBlockPoolSize * (<span class="keyword">sizeof</span>(CNodeBegin) + alignedSize +
+00726 NL_HEAP_NODE_END_SIZE), NL_HEAP_SB_CATEGORY);
+00727
+00728 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_12">enterCriticalSectionSB</a> ();
+00729
+00730 <span class="comment">// Link this new block</span>
+00731 smallBlock-&gt;Size = alignedSize;
+00732 smallBlock-&gt;Next = (CSmallBlockPool*)<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_6">_SmallBlockPool</a>;
+00733 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_6">_SmallBlockPool</a> = smallBlock;
+00734
+00735 <span class="comment">// Initialize the block</span>
+00736 <a class="code" href="a04558.html#a15">uint</a> pool;
+00737 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *nextNode = *freeNode;
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_0" doxytag="NLMEMORY::CHeapAllocator::checkHeap" ></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"> bool NLMEMORY::CHeapAllocator::checkHeap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>stopOnError</em> </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="a05775.html#l03029">3029</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_8" doxytag="NLMEMORY::CHeapAllocator::checkNode" ></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 NLMEMORY::CHeapAllocator::checkNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>current</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>crc</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</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="a05775.html#l03193">3193</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_9" doxytag="NLMEMORY::CHeapAllocator::checkNodeLB" ></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"> bool NLMEMORY::CHeapAllocator::checkNodeLB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02616.html">CMainBlock</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>mainBlock</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>previous</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>current</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>next</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>stopOnError</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [inline, private]</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="a05775.html#l00540">540</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00568 {
+00569 <span class="comment">// Get the node pointer</span>
+00570 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *node = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_38">getFirstNode</a> (&amp;mainBlock);
+00571
+00572 <span class="comment">// Allocated size remaining after alignment</span>
+00573 <a class="code" href="a04356.html#a0">internalAssert</a> ((<a class="code" href="a04558.html#a11">uint32</a>)node - (<a class="code" href="a04558.html#a11">uint32</a>)mainBlock.Ptr &gt;= 0);
+00574 <a class="code" href="a04558.html#a15">uint</a> allocSize = mainBlock.Size - ((<a class="code" href="a04558.html#a11">uint32</a>)node - (<a class="code" href="a04558.html#a11">uint32</a>)mainBlock.Ptr);
+00575
+00576 <span class="comment">// *** Fill the new node header</span>
+00577
+00578 <span class="comment">// User data size</span>
+00579 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_58">setNodeSize</a> (node, allocSize-<span class="keyword">sizeof</span> (CNodeBegin)-NL_HEAP_NODE_END_SIZE);
+00580
+00581 <span class="comment">// Node is free</span>
+00582 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_55">setNodeFree</a> (node);
+00583
+00584 <span class="comment">// Node is last</span>
+00585 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_56">setNodeLast</a> (node, <span class="keyword">true</span>);
+00586
+00587 <span class="comment">// No previous node</span>
+00588 node-&gt;Previous = NULL;
+00589
+00590 <span class="comment">// Debug info</span>
+00591 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+00592 <span class="preprocessor"></span> <span class="comment">// End magic number</span>
+00593 node-&gt;EndMagicNumber = (<a class="code" href="a04558.html#a11">uint32</a>*)((<a class="code" href="a04558.html#a7">uint8</a>*)node + <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_45">getNodeSize</a> (node) + <span class="keyword">sizeof</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a>));
+00594
+00595 <span class="comment">// Begin markers</span>
+00596 memset (node-&gt;BeginMarkers, BeginNodeMarkers, CNodeBegin::MarkerSize-1);
+00597 node-&gt;BeginMarkers[CNodeBegin::MarkerSize-1] = 0;
+00598
+00599 <span class="comment">// End markers</span>
+00600 CNodeEnd *endNode = (CNodeEnd*)node-&gt;EndMagicNumber;
+00601 memset (endNode-&gt;EndMarkers, EndNodeMarkers, CNodeEnd::MarkerSize-1);
+00602 endNode-&gt;EndMarkers[CNodeEnd::MarkerSize-1] = 0;
+00603
+00604 <span class="comment">// Unallocated memory</span>
+00605 memset ((<a class="code" href="a04558.html#a7">uint8</a>*)node + <span class="keyword">sizeof</span>(CNodeBegin), UnallocatedMemory, getNodeSize (node) );
+00606
+00607 <span class="comment">// No source file</span>
+00608 memset (node-&gt;Category, 0, CategoryStringLength);
+00609 node-&gt;File = NULL;
+00610 node-&gt;Line = 0xffff;
+00611 node-&gt;AllocateNumber = 0xffffffff;
+00612
+00613 <span class="comment">// Heap pointer</span>
+00614 node-&gt;Heap = <span class="keyword">this</span>;
+00615
+00616 <a class="code" href="a04356.html#a1">NL_UPDATE_MAGIC_NUMBER</a> (node);
+00617 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+00618 <span class="preprocessor"></span>}
+00619
+00620 <span class="comment">// *********************************************************</span>
+00621
+00622 <a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::getBlockSize (<span class="keywordtype">void</span> *block)
+00623 {
+00624 <span class="comment">// Get the node pointer</span>
+00625 CNodeBegin *node = (CNodeBegin*) ((<a class="code" href="a04558.html#a15">uint</a>)block - <span class="keyword">sizeof</span> (CNodeBegin));
+00626
+00627 <span class="keywordflow">return</span> getNodeSize (((CNodeBegin*) ((<a class="code" href="a04558.html#a15">uint</a>)block - <span class="keyword">sizeof</span> (CNodeBegin))));
+00628 }
+00629
+00630 <span class="comment">// *********************************************************</span>
+00631
+00632 <span class="keyword">const</span> <span class="keywordtype">char</span> * CHeapAllocator::getCategory (<span class="keywordtype">void</span> *block)
+00633 {
+00634 <span class="comment">// Get the node pointer</span>
+00635 CNodeBegin *node = (CNodeBegin*) ((<a class="code" href="a04558.html#a15">uint</a>)block - <span class="keyword">sizeof</span> (CNodeBegin));
+00636 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_1" doxytag="NLMEMORY::CHeapAllocator::checkNodeSB" ></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"> bool NLMEMORY::CHeapAllocator::checkNodeSB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02626.html">CSmallBlockPool</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>mainBlock</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>previous</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>current</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>next</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>stopOnError</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [inline, private]</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="a05775.html#l00474">474</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00496 {
+00497 <span class="comment">// Set previous</span>
+00498 next-&gt;Previous = newNode;
+00499
+00500 <a class="code" href="a04356.html#a1">NL_UPDATE_MAGIC_NUMBER</a> (next);
+00501 }
+00502
+00503 <span class="comment">// Should be big enough</span>
+00504 <a class="code" href="a04356.html#a0">internalAssert</a> (getNodeSize (newNode) &gt;= UserDataBlockSizeMin);
+00505
+00506 <span class="comment">// New size of the first node</span>
+00507 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_58">setNodeSize</a> (node, allignedSize);
+00508
+00509 <span class="comment">// No more the last</span>
+00510 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_56">setNodeLast</a> (node, <span class="keyword">false</span>);
+00511
+00512 <span class="comment">// Return new node</span>
+00513 <span class="keywordflow">return</span> newNode;
+00514 }
+00515
+00516 <span class="comment">// *********************************************************</span>
+00517
+00518 <span class="keywordtype">void</span> CHeapAllocator::mergeNode (CNodeBegin *node)
+00519 {
+00520 <span class="comment">// Get the previous node to merge with</span>
+00521 CNodeBegin *previous = node-&gt;Previous;
+00522 <a class="code" href="a04356.html#a0">internalAssert</a> (getNextNode (previous) == node);
+00523 <a class="code" href="a04356.html#a0">internalAssert</a> (previous);
+00524 <a class="code" href="a04356.html#a0">internalAssert</a> (isNodeFree (previous));
+00525
+00526 <span class="comment">// New size</span>
+00527 setNodeSize (previous, getNodeSize (previous) + getNodeSize (node) + <span class="keyword">sizeof</span> (CNodeBegin) + NL_HEAP_NODE_END_SIZE);
+00528
+00529 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+00530 <span class="preprocessor"></span> <span class="comment">// Set end pointers</span>
+00531 previous-&gt;EndMagicNumber = (<a class="code" href="a04558.html#a11">uint32</a>*)((<a class="code" href="a04558.html#a7">uint8</a>*)previous + getNodeSize (previous) + <span class="keyword">sizeof</span> (CNodeBegin));
+00532 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+00533 <span class="preprocessor"></span>
+00534 <span class="comment">// Get the next node to relink</span>
+00535 CNodeBegin *next = getNextNode (node);
+00536 <span class="keywordflow">if</span> (next)
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_35" doxytag="NLMEMORY::CHeapAllocator::computeCRC32" ></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 NLMEMORY::CHeapAllocator::computeCRC32 </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>crc</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const void *&nbsp;</td>
+ <td class="mdname" nowrap> <em>buffer</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>unsigned int&nbsp;</td>
+ <td class="mdname" nowrap> <em>count</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, static, private]</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="a05775.html#l00340">340</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05775.html#l00145">isNodeBlack()</a>, <a class="el" href="a05775.html#l00138">isNodeRed()</a>, <a class="el" href="a05779.html#l00047">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a>, <a class="el" href="a05775.html#l00214">rotateLeft()</a>, <a class="el" href="a05775.html#l00260">rotateRight()</a>, <a class="el" href="a05775.html#l00205">setNodeBlack()</a>, <a class="el" href="a05775.html#l00188">setNodeColor()</a>, <a class="el" href="a05775.html#l00198">setNodeRed()</a>, <a class="el" href="a05646.html#l00236">w</a>, and <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+<div class="fragment"><pre>00341 {
+00342 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a572">x</a> == <a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Left)
+00343 {
+00344 CFreeNode *<a class="code" href="a04223.html#a575">w</a> = <a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Right;
+00345 <span class="keywordflow">if</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_49">isNodeRed</a> (w))
+00346 {
+00347 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_53">setNodeBlack</a> (w);
+00348 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_57">setNodeRed</a> (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent);
+00349 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_21">rotateLeft</a> (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent);
+00350
+00351 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (w);
+00352
+00353 <a class="code" href="a04223.html#a575">w</a> = <a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Right;
+00354 }
+00355 <span class="keywordflow">if</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_46">isNodeBlack</a> (<a class="code" href="a04223.html#a575">w</a>-&gt;Left) &amp;&amp; <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_46">isNodeBlack</a> (<a class="code" href="a04223.html#a575">w</a>-&gt;Right))
+00356 {
+00357 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_57">setNodeRed</a> (w);
+00358 <a class="code" href="a04223.html#a572">x</a> = <a class="code" href="a04223.html#a572">x</a>-&gt;Parent;
+00359
+00360 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (w);
+00361 }
+00362 <span class="keywordflow">else</span>
+00363 {
+00364 <span class="keywordflow">if</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_46">isNodeBlack</a> (<a class="code" href="a04223.html#a575">w</a>-&gt;Right))
+00365 {
+00366 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_53">setNodeBlack</a> (<a class="code" href="a04223.html#a575">w</a>-&gt;Left);
+00367 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_57">setNodeRed</a> (w);
+00368 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_22">rotateRight</a> (w);
+00369 <a class="code" href="a04223.html#a575">w</a> = <a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Right;
+00370 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_1" doxytag="NLMEMORY::CHeapAllocator::debugAlwaysCheckMemory" ></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 NLMEMORY::CHeapAllocator::debugAlwaysCheckMemory </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>alwaysCheck</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>
+
+<p>
+Definition at line <a class="el" href="a05775.html#l03122">3122</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_2" doxytag="NLMEMORY::CHeapAllocator::debugGetAllocatedMemoryByCategory" ></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> NLMEMORY::CHeapAllocator::debugGetAllocatedMemoryByCategory </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const char *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>category</em> </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="a05775.html#l02160">2160</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>02162 {
+02163 <span class="preprocessor">#undef malloc</span>
+02164 <span class="preprocessor"></span> <span class="keywordflow">return</span> (<a class="code" href="a04558.html#a7">uint8</a>*)::malloc (<a class="code" href="a04223.html#a587">size</a>);
+02165 }
+02166
+02167 <span class="comment">// *********************************************************</span>
+02168
+02169 <span class="keywordtype">void</span> CHeapAllocator::freeBlock (<a class="code" href="a04558.html#a7">uint8</a> *block)
+02170 {
+02171 ::free (block);
+02172 }
+02173
+02174 <span class="comment">// *********************************************************</span>
+02175
+02176 <span class="keywordtype">bool</span> CHeapAllocator::internalCheckHeap (<span class="keywordtype">bool</span> stopOnError)<span class="keyword"> const</span>
+02177 <span class="keyword"></span>{
+02178 enterCriticalSection ();
+02179
+02180 <span class="comment">// For each small blocks</span>
+02181 CSmallBlockPool *pool = (CSmallBlockPool*)_SmallBlockPool;
+02182 <span class="keywordflow">while</span> (pool)
+02183 {
+02184 <span class="comment">// For each small block</span>
+02185 <a class="code" href="a04558.html#a15">uint</a> smallBlock;
+02186 CNodeBegin *previous = NULL;
+02187 <span class="keywordflow">for</span> (smallBlock=0; smallBlock&lt;SmallBlockPoolSize; smallBlock++)
+02188 {
+02189 <span class="comment">// Get the small block</span>
+02190 CNodeBegin *node = getSmallBlock (pool, smallBlock);
+02191 CNodeBegin *next = (smallBlock+1&lt;SmallBlockPoolSize) ? getSmallBlock (pool, smallBlock+1) : NULL;
+02192
+02193 <span class="comment">// Check node</span>
+02194 checkNodeSB (pool, previous, node, next, stopOnError);
+02195
+02196 previous = node;
+02197 }
+02198
+02199 <span class="comment">// Next pool</span>
+02200 pool = pool-&gt;Next;
+02201 }
+02202
+02203 <span class="comment">// For each main block</span>
+02204 CMainBlock *currentBlock = _MainBlockList;
+02205 <span class="keywordflow">while</span> (currentBlock)
+02206 {
+02207 <span class="comment">// Get the nodes</span>
+02208 <span class="keyword">const</span> CNodeBegin *previous = NULL;
+02209 <span class="keyword">const</span> CNodeBegin *current = getFirstNode (currentBlock);
+02210 <a class="code" href="a04356.html#a0">internalAssert</a> (current); <span class="comment">// Should have at least one block in the main block</span>
+02211 <span class="keyword">const</span> CNodeBegin *next;
+02212
+02213 <span class="comment">// For each node</span>
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_3" doxytag="NLMEMORY::CHeapAllocator::debugGetDebugInfoSize" ></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> NLMEMORY::CHeapAllocator::debugGetDebugInfoSize </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="a05775.html#l02219">2219</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_4" doxytag="NLMEMORY::CHeapAllocator::debugGetLBDebugInfoSize" ></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> NLMEMORY::CHeapAllocator::debugGetLBDebugInfoSize </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="a05775.html#l02225">2225</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>02246 {
+02247 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_25">_AlwaysCheck</a> = alwaysCheck;
+02248 }
+02249 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+02250 <span class="preprocessor"></span>
+02251 <span class="comment">// *********************************************************</span>
+02252
+02253 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+02254 <span class="preprocessor"></span><span class="keywordtype">bool</span> CHeapAllocator::debugIsAlwaysCheckMemory ()<span class="keyword"> const</span>
+02255 <span class="keyword"></span>{
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_5" doxytag="NLMEMORY::CHeapAllocator::debugGetSBDebugInfoSize" ></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> NLMEMORY::CHeapAllocator::debugGetSBDebugInfoSize </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="a05775.html#l02257">2257</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>02263 {
+02264 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_10">enterCriticalSection</a> ();
+02265
+02266 strncpy (_Name, name, NameLength-1);
+02267
+02268 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_18">leaveCriticalSection</a> ();
+02269 }
+02270
+02271 <span class="comment">// *********************************************************</span>
+02272 <span class="comment">// Category control</span>
+02273 <span class="comment">// *********************************************************</span>
+02274
+02275 <span class="keywordtype">void</span> CHeapAllocator::debugPushCategoryString (<span class="keyword">const</span> <span class="keywordtype">char</span> *str)
+02276 {
+02277 <span class="comment">// Get the category stack pointer</span>
+02278 CCategory *last = (CCategory*)_CategoryStack.getPointer ();
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_6" doxytag="NLMEMORY::CHeapAllocator::debugIsAlwaysCheckMemory" ></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"> bool NLMEMORY::CHeapAllocator::debugIsAlwaysCheckMemory </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="a05775.html#l03131">3131</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1221_0" doxytag="NLMEMORY::CHeapAllocator::debugPopCategoryString" ></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 NLMEMORY::CHeapAllocator::debugPopCategoryString </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="a05775.html#l03168">3168</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1221_1" doxytag="NLMEMORY::CHeapAllocator::debugPushCategoryString" ></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 NLMEMORY::CHeapAllocator::debugPushCategoryString </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const char *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>str</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>
+
+<p>
+Definition at line <a class="el" href="a05775.html#l03152">3152</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_7" doxytag="NLMEMORY::CHeapAllocator::debugReportMemoryLeak" ></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 NLMEMORY::CHeapAllocator::debugReportMemoryLeak </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="a05775.html#l02893">2893</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_8" doxytag="NLMEMORY::CHeapAllocator::debugStatisticsReport" ></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"> bool NLMEMORY::CHeapAllocator::debugStatisticsReport </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>stateFile</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>memoryMap</em></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>
+
+<p>
+Definition at line <a class="el" href="a05775.html#l02329">2329</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>02333 {
+02334 <span class="comment">// ********</span>
+02335 <span class="comment">// * STOP *</span>
+02336 <span class="comment">// ********</span>
+02337 <span class="comment">// * This node is not hold by this heap. It has been allocated with another heap.</span>
+02338 <span class="comment">// ********</span>
+02339 <span class="comment">// * (*node) Check for more informations</span>
+02340 <span class="comment">// ********</span>
+02341 <a class="code" href="a04356.html#a3">NL_ALLOC_STOP</a>;
+02342 }
+02343 }
+02344
+02345 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+02346 <span class="preprocessor"></span><span class="preprocessor">#pragma optimize( "", on )</span>
+02347 <span class="preprocessor"></span><span class="preprocessor">#endif // NL_OS_WINDOWS</span>
+02348 <span class="preprocessor"></span>
+02349 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+02350 <span class="preprocessor"></span>
+02351 <span class="comment">// *********************************************************</span>
+02352
+02353 <a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::getAllocatedSystemMemory ()
+02354 {
+02355 <a class="code" href="a04558.html#a15">uint</a> systemMemory = 0;
+02356 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+02357 <span class="preprocessor"></span> <span class="comment">// Get system memory informations</span>
+02358 HANDLE hHeap[100];
+02359 DWORD heapCount = GetProcessHeaps (100, hHeap);
+02360
+02361 <a class="code" href="a04558.html#a15">uint</a> heap;
+02362 <span class="keywordflow">for</span> (heap = 0; heap &lt; heapCount; heap++)
+02363 {
+02364 PROCESS_HEAP_ENTRY entry;
+02365 entry.lpData = NULL;
+02366 <span class="keywordflow">while</span> (HeapWalk (hHeap[heap], &amp;entry))
+02367 {
+02368 <span class="keywordflow">if</span> (entry.wFlags &amp; PROCESS_HEAP_ENTRY_BUSY)
+02369 {
+02370 systemMemory += entry.cbData + entry.cbOverhead;
+02371 }
+02372 }
+02373 }
+02374 <span class="preprocessor">#endif // NL_OS_WINDOWS</span>
+02375 <span class="preprocessor"></span> <span class="keywordflow">return</span> systemMemory;
+02376 }
+02377
+02378 <span class="comment">// *********************************************************</span>
+02379
+02380 <span class="keyword">class </span>CPointerEntry
+02381 {
+02382 <span class="keyword">public</span>:
+02383 CPointerEntry (<span class="keywordtype">void</span> *<a class="code" href="a04223.html#a570">pointer</a>, CPointerEntry *entry)
+02384 {
+02385 Pointer = <a class="code" href="a04223.html#a570">pointer</a>;
+02386 Next = entry;
+02387 }
+02388 <span class="keyword">static</span> CPointerEntry *find (CPointerEntry *cat, <span class="keywordtype">void</span> *<a class="code" href="a04223.html#a570">pointer</a>)
+02389 {
+02390 <span class="keywordflow">while</span> (cat)
+02391 {
+02392 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a570">pointer</a> == cat-&gt;Pointer)
+02393 <span class="keywordflow">break</span>;
+02394 cat = cat-&gt;Next;
+02395 }
+02396 <span class="keywordflow">return</span> cat;
+02397 }
+02398 <span class="keywordtype">void</span> *Pointer;
+02399 CPointerEntry *Next;
+02400 };
+02401
+02402 <a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::getAllocatedSystemMemoryByAllocator ()
+02403 {
+02404 <a class="code" href="a04558.html#a15">uint</a> nelSystemMemory = 0;
+02405
+02406 <span class="comment">// Build a set of allocated system memory pointers</span>
+02407 CPointerEntry *entries = NULL;
+02408
+02409 <span class="comment">// For each main block</span>
+02410 CMainBlock *currentBlock = _MainBlockList;
+02411 <span class="keywordflow">while</span> (currentBlock)
+02412 {
+02413 <span class="comment">// Save pointers</span>
+02414 entries = <span class="keyword">new</span> CPointerEntry ((<span class="keywordtype">void</span>*)currentBlock, entries);
+02415 entries = <span class="keyword">new</span> CPointerEntry ((<span class="keywordtype">void</span>*)currentBlock-&gt;Ptr, entries);
+02416
+02417 <span class="comment">// Next block</span>
+02418 currentBlock = currentBlock-&gt;Next;
+02419 }
+02420
+02421 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+02422 <span class="preprocessor"></span> <span class="comment">// Get system memory informations</span>
+02423 HANDLE hHeap[100];
+02424 DWORD heapCount = GetProcessHeaps (100, hHeap);
+02425
+02426 FILE *<a class="code" href="a04115.html#a95">file</a> = fopen (<span class="stringliteral">"dump.bin"</span>, <span class="stringliteral">"wb"</span>);
+02427
+02428 <a class="code" href="a04558.html#a15">uint</a> heap;
+02429 <span class="keywordflow">for</span> (heap = 0; heap &lt; heapCount; heap++)
+02430 {
+02431 PROCESS_HEAP_ENTRY entry;
+02432 entry.lpData = NULL;
+02433 <a class="code" href="a04558.html#a15">uint</a> block = 0;
+02434 <span class="keywordflow">while</span> (HeapWalk (hHeap[heap], &amp;entry))
+02435 {
+02436 <span class="keywordflow">if</span> (entry.wFlags &amp; PROCESS_HEAP_ENTRY_BUSY)
+02437 {
+02438 <span class="comment">// This pointer is already used ?</span>
+02439 <span class="keywordflow">if</span> ( CPointerEntry::find (entries, (<span class="keywordtype">void</span>*)((<span class="keywordtype">char</span>*)entry.lpData)) ||
+02440 CPointerEntry::find (entries, (<span class="keywordtype">void</span>*)((<span class="keywordtype">char</span>*)entry.lpData+32) ) )
+02441 nelSystemMemory += entry.cbData + entry.cbOverhead;
+02442 <span class="keywordflow">else</span>
+02443 {
+02444 fwrite (entry.lpData, 1, entry.cbData, file);
+02445 }
+02446 }
+02447 block++;
+02448 }
+02449 }
+02450
+02451 fclose (file);
+02452
+02453 <span class="preprocessor">#endif // NL_OS_WINDOWS</span>
+02454 <span class="preprocessor"></span>
+02455 <span class="keywordflow">return</span> nelSystemMemory;
+02456 }
+02457
+02458 <span class="comment">// *********************************************************</span>
+02459
+02460 <a class="code" href="a04558.html#a7">uint8</a> *CHeapAllocator::internalAllocateBlock (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a>)
+02461 {
+02462 <a class="code" href="a04558.html#a7">uint8</a> *ptr = allocateBlock (size);
+02463
+02464 <span class="keywordflow">return</span> ptr;
+02465 }
+02466
+02467 <span class="comment">// *********************************************************</span>
+02468
+02469 <span class="keywordtype">void</span> CHeapAllocator::outOfMemory()
+02470 {
+02471 <span class="comment">// Out of memory callback</span>
+02472 <span class="keywordflow">if</span> (_OutOfMemoryCallback)
+02473 _OutOfMemoryCallback();
+02474
+02475 <span class="comment">// Select outofmemory mode</span>
+02476 <span class="keywordflow">if</span> (_OutOfMemoryMode == ThrowException)
+02477 <span class="keywordflow">throw</span> 0;
+02478 }
+02479
+02480 <span class="comment">// *********************************************************</span>
+02481
+02482 <span class="keywordtype">void</span> CHeapAllocator::setOutOfMemoryHook (<span class="keywordtype">void</span> (*outOfMemoryCallback)())
+02483 {
+02484 _OutOfMemoryCallback = outOfMemoryCallback;
+02485 }
+02486
+02487 <span class="comment">// *********************************************************</span>
+02488
+02489 } <span class="comment">// NLMEMORY</span>
+02490 } <span class="comment">// NLMEMORY</span>
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_10" doxytag="NLMEMORY::CHeapAllocator::enterCriticalSection" ></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 NLMEMORY::CHeapAllocator::enterCriticalSection </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<code> [inline, private]</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="a05775.html#l00771">771</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00837 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_11" doxytag="NLMEMORY::CHeapAllocator::enterCriticalSectionLB" ></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 NLMEMORY::CHeapAllocator::enterCriticalSectionLB </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<code> [inline, private]</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="a05775.html#l00757">757</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00096">uint8</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_12" doxytag="NLMEMORY::CHeapAllocator::enterCriticalSectionSB" ></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 NLMEMORY::CHeapAllocator::enterCriticalSectionSB </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<code> [inline, private]</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="a05775.html#l00743">743</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_13" doxytag="NLMEMORY::CHeapAllocator::erase" ></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 NLMEMORY::CHeapAllocator::erase </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>z</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, private]</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="a05775.html#l01128">1128</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05779.html#l00060">NL_ALLOC_STOP</a>.
+<p>
+<div class="fragment"><pre>01132 : the already deleted node
+01133 <span class="comment">// ********</span>
+01134 <a class="code" href="a04356.html#a3">NL_ALLOC_STOP</a>;
+01135 }
+01136 <span class="keywordflow">else</span>
+01137 {
+01138 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_11">enterCriticalSectionLB</a> ();
+01139
+01140 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01141 <span class="preprocessor"></span> <span class="comment">// Uninitialised memory</span>
+01142 memset ((<a class="code" href="a04558.html#a7">uint8</a>*)node + <span class="keyword">sizeof</span>(CNodeBegin), DeletedMemory, <a class="code" href="a04223.html#a587">size</a> );
+01143
+01144 <span class="comment">// Set end pointers</span>
+01145 node-&gt;EndMagicNumber = (<a class="code" href="a04558.html#a11">uint32</a>*)((<a class="code" href="a04558.html#a7">uint8</a>*)node + <a class="code" href="a04223.html#a587">size</a> + <span class="keyword">sizeof</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a>));
+01146 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01147 <span class="preprocessor"></span>
+01148 <span class="comment">// Mark has free</span>
+01149 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_55">setNodeFree</a> (node);
+01150
+01151 <span class="comment">// *******************</span>
+01152 <span class="comment">// Large block</span>
+01153 <span class="comment">// *******************</span>
+01154
+01155 <span class="comment">// A free node</span>
+01156 CHeapAllocator::CFreeNode *freeNode = NULL;
+01157
+01158 <span class="comment">// Previous node</span>
+01159 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *previous = node-&gt;Previous;
+01160 <span class="keywordflow">if</span> (previous)
+01161 {
+01162 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01163 <span class="preprocessor"></span> <span class="comment">// Check the previous node</span>
+01164 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_8">checkNode</a> (previous, evalMagicNumber (previous));
+01165 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01166 <span class="preprocessor"></span>
+01167 <span class="comment">// Is it free ?</span>
+01168 <span class="keywordflow">if</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_47">isNodeFree</a> (previous))
+01169 {
+01170 <span class="comment">// Merge the two nodes</span>
+01171 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_52">mergeNode</a> (node);
+01172
+01173 <span class="comment">// Get its free node</span>
+01174 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_13">erase</a> (getFreeNode (previous));
+01175
+01176 <span class="comment">// Curent node</span>
+01177 node = previous;
+01178 }
+01179 }
+01180
+01181 <span class="comment">// Mark has free</span>
+01182 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_55">setNodeFree</a> (node);
+01183
+01184 <span class="comment">// Next node</span>
+01185 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *next = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_42">getNextNode</a> (node);
+01186 <span class="keywordflow">if</span> (next)
+01187 {
+01188 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01189 <span class="preprocessor"></span> <span class="comment">// Check the next node</span>
+01190 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_8">checkNode</a> (next, evalMagicNumber (next));
+01191 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01192 <span class="preprocessor"></span>
+01193 <span class="comment">// Is it free ?</span>
+01194 <span class="keywordflow">if</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_47">isNodeFree</a> (next))
+01195 {
+01196 <span class="comment">// Free the new one</span>
+01197 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_13">erase</a> (getFreeNode (next));
+01198
+01199 <span class="comment">// Merge the two nodes</span>
+01200 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_52">mergeNode</a> (next);
+01201 }
+01202 }
+01203
+01204 <span class="comment">// Insert it into the tree</span>
+01205 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_16">insert</a> (getFreeNode (node));
+01206
+01207 <a class="code" href="a04356.html#a1">NL_UPDATE_MAGIC_NUMBER</a> (node);
+01208
+01209 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_19">leaveCriticalSectionLB</a> ();
+01210 }
+01211 }
+01212 }
+01213 }
+01214
+01215 <span class="comment">// *********************************************************</span>
+01216 <span class="comment">// Statistics</span>
+01217 <span class="comment">// *********************************************************</span>
+01218
+01219 <a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::getAllocatedMemory ()<span class="keyword"> const</span>
+01220 <span class="keyword"></span>{
+01221 enterCriticalSection ();
+01222
+01223 <span class="comment">// Sum allocated memory</span>
+01224 <a class="code" href="a04558.html#a15">uint</a> memory = 0;
+01225
+01226 <span class="comment">// For each small block</span>
+01227 CSmallBlockPool *currentSB = (CSmallBlockPool *)_SmallBlockPool;
+01228 <span class="keywordflow">while</span> (currentSB)
+01229 {
+01230 <span class="comment">// For each node in this small block pool</span>
+01231 <a class="code" href="a04558.html#a15">uint</a> block;
+01232 <span class="keywordflow">for</span> (block=0; block&lt;SmallBlockPoolSize; block++)
+01233 {
+01234 <span class="comment">// Get the node</span>
+01235 <span class="keyword">const</span> CNodeBegin *current = getSmallBlock (currentSB, block);
+01236
+01237 <span class="comment">// Node allocated ?</span>
+01238 <span class="keywordflow">if</span> (isNodeUsed (current))
+01239 memory += getNodeSize (current) + ReleaseHeaderSize;
+01240 }
+01241
+01242 <span class="comment">// Next block</span>
+01243 currentSB = currentSB-&gt;Next;
+01244 }
+01245
+01246 <span class="comment">// For each main block</span>
+01247 CMainBlock *currentBlock = _MainBlockList;
+01248 <span class="keywordflow">while</span> (currentBlock)
+01249 {
+01250 <span class="comment">// Get the first node</span>
+01251 <span class="keyword">const</span> CNodeBegin *current = getFirstNode (currentBlock);
+01252 <span class="keywordflow">while</span> (current)
+01253 {
+01254 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01255 <span class="preprocessor"></span> <span class="comment">// Check node</span>
+01256 checkNode (current, evalMagicNumber (current));
+01257 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01258 <span class="preprocessor"></span>
+01259 <span class="comment">// Node allocated ? Don't sum small blocks..</span>
+01260 <span class="keywordflow">if</span> (isNodeUsed (current))
+01261 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01262 <span class="preprocessor"></span> <span class="keywordflow">if</span> (strcmp (current-&gt;Category, NL_HEAP_SB_CATEGORY) != 0)
+01263 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01264 <span class="preprocessor"></span> memory += getNodeSize (current) + ReleaseHeaderSize;
+01265
+01266 <span class="comment">// Next node</span>
+01267 current = getNextNode (current);
+01268 }
+01269
+01270 <span class="comment">// Next block</span>
+01271 currentBlock = currentBlock-&gt;Next;
+01272 }
+01273
+01274 leaveCriticalSection ();
+01275
+01276 <span class="comment">// Return memory used</span>
+01277 <span class="keywordflow">return</span> memory;
+01278 }
+01279
+01280 <span class="comment">// *********************************************************</span>
+01281
+01282 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01283 <span class="preprocessor"></span><a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::debugGetAllocatedMemoryByCategory (<span class="keyword">const</span> <span class="keywordtype">char</span>* category)<span class="keyword"> const</span>
+01284 <span class="keyword"></span>{
+01285 enterCriticalSection ();
+01286
+01287 <span class="comment">// Sum allocated memory</span>
+01288 <a class="code" href="a04558.html#a15">uint</a> memory = 0;
+01289
+01290 <span class="comment">// For each small block</span>
+01291 CSmallBlockPool *currentSB = (CSmallBlockPool *)_SmallBlockPool;
+01292 <span class="keywordflow">while</span> (currentSB)
+01293 {
+01294 <span class="comment">// For each node in this small block pool</span>
+01295 <a class="code" href="a04558.html#a15">uint</a> block;
+01296 <span class="keywordflow">for</span> (block=0; block&lt;SmallBlockPoolSize; block++)
+01297 {
+01298 <span class="comment">// Get the node</span>
+01299 <span class="keyword">const</span> CNodeBegin *current = getSmallBlock (currentSB, block);
+01300
+01301 <span class="comment">// Node allocated ?</span>
+01302 <span class="keywordflow">if</span> ((isNodeUsed (current)) &amp;&amp; (strcmp (current-&gt;Category, category)==0))
+01303 memory += getNodeSize (current);
+01304
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_36" doxytag="NLMEMORY::CHeapAllocator::evalMagicNumber" ></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#a11">uint32</a> NLMEMORY::CHeapAllocator::evalMagicNumber </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>node</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00453">453</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05777.html#l00324">NL_HEAP_NODE_END_SIZE</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_14" doxytag="NLMEMORY::CHeapAllocator::find" ></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="a02614.html">CHeapAllocator::CFreeNode</a> * NLMEMORY::CHeapAllocator::find </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><code> [inline, private]</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="a05775.html#l00310">310</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05779.html#l00032">internalAssert</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a05646.html#l00236">z</a>.
+<p>
+<div class="fragment"><pre>00310 {
+00311 <a class="code" href="a04356.html#a0">internalAssert</a> (_FreeTreeRoot == <a class="code" href="a04223.html#a574">z</a>);
+00312 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_28">_FreeTreeRoot</a> = <a class="code" href="a04223.html#a573">y</a>;
+00313 }
+00314
+00315 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a>-&gt;Left)
+00316 {
+00317 <a class="code" href="a04356.html#a0">internalAssert</a> (<a class="code" href="a04223.html#a573">y</a>-&gt;Left-&gt;Parent == <a class="code" href="a04223.html#a574">z</a>);
+00318 <a class="code" href="a04223.html#a573">y</a>-&gt;Left-&gt;Parent = <a class="code" href="a04223.html#a573">y</a>;
+00319
+00320 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (<a class="code" href="a04223.html#a573">y</a>-&gt;Left);
+00321 }
+00322 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a>-&gt;Right)
+00323 {
+00324 <a class="code" href="a04356.html#a0">internalAssert</a> (<a class="code" href="a04223.html#a573">y</a>-&gt;Right-&gt;Parent == <a class="code" href="a04223.html#a574">z</a>);
+00325 <a class="code" href="a04223.html#a573">y</a>-&gt;Right-&gt;Parent = <a class="code" href="a04223.html#a573">y</a>;
+00326
+00327 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (<a class="code" href="a04223.html#a573">y</a>-&gt;Right);
+00328 }
+00329 }
+00330
+00331 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (<a class="code" href="a04223.html#a572">x</a>);
+00332 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (<a class="code" href="a04223.html#a573">y</a>);
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_3" doxytag="NLMEMORY::CHeapAllocator::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 NLMEMORY::CHeapAllocator::free </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>ptr</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>
+Free a pointer
+<p>
+Definition at line <a class="el" href="a05775.html#l01896">1896</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>01912 {
+01913 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_10">enterCriticalSection</a> ();
+01914
+01915 <span class="comment">// Sum free memory</span>
+01916 <a class="code" href="a04558.html#a15">uint</a> memory = 0;
+01917
+01918 <span class="comment">// Clear the free tree</span>
+01919 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_28">_FreeTreeRoot</a> = &amp;<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_33">_NullNode</a>.<a class="code" href="a02624.html#NLMEMORY_1_1CHeapAllocator_1_1CNullNodeo0">FreeNode</a>;
+01920
+01921 <span class="comment">// For each main block</span>
+01922 CMainBlock *currentBlock = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_29">_MainBlockList</a>;
+01923 <span class="keywordflow">while</span> (currentBlock)
+01924 {
+01925 <span class="comment">// Reinit this block</span>
+01926 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_15">initEmptyBlock</a> (*currentBlock);
+01927
+01928 <span class="comment">// Get first block</span>
+01929 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *node = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_38">getFirstNode</a> (currentBlock);
+01930
+01931 <span class="comment">// Insert the free node</span>
+01932 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_16">insert</a> (getFreeNode (node));
+01933
+01934 <a class="code" href="a04356.html#a1">NL_UPDATE_MAGIC_NUMBER</a> (node);
+01935
+01936 <span class="comment">// Next block</span>
+01937 currentBlock = currentBlock-&gt;Next;
+01938 }
+01939
+01940 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_18">leaveCriticalSection</a> ();
+01941 }
+01942
+01943 <span class="comment">// *********************************************************</span>
+01944
+01945 <span class="keywordtype">void</span> CHeapAllocator::releaseMemory ()
+01946 {
+01947 enterCriticalSection ();
+01948
+01949 <span class="comment">// Clear the free tree</span>
+01950 _FreeTreeRoot = &amp;_NullNode.FreeNode;
+01951
+01952 <span class="comment">// For each main block</span>
+01953 CMainBlock *currentBlock = _MainBlockList;
+01954 <span class="keywordflow">while</span> (currentBlock)
+01955 {
+01956 freeBlock (currentBlock-&gt;Ptr);
+01957
+01958 <span class="comment">// Next block</span>
+01959 CMainBlock *toDelete = currentBlock;
+01960 currentBlock = toDelete-&gt;Next;
+01961 ::free (toDelete);
+01962 }
+01963
+01964 <span class="comment">// Erase block node</span>
+01965 _MainBlockList = NULL;
+01966
+01967 leaveCriticalSection ();
+01968 }
+01969
+01970 <span class="comment">// *********************************************************</span>
+01971
+01972 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01973 <span class="preprocessor"></span>
+01974 <span class="keyword">class </span>CLeak
+01975 {
+01976 <span class="keyword">public</span>:
+01977
+01978 CLeak (<span class="keyword">const</span> <span class="keywordtype">char</span> *name, CLeak *next)
+01979 {
+01980 Name = <span class="keyword">new</span> <span class="keywordtype">char</span>[strlen (name)+1];
+01981 strcpy (Name, name);
+01982 Count = 0;
+01983 Memory = 0;
+01984 Next = next;
+01985 }
+01986
+01987 ~CLeak ()
+01988 {
+01989 <span class="keyword">delete</span> [] Name;
+01990 <span class="keywordflow">if</span> (Next)
+01991 <span class="keyword">delete</span> Next;
+01992 }
+01993
+01994 <span class="keyword">static</span> CLeak *find (CLeak *cat, <span class="keyword">const</span> <span class="keywordtype">char</span> *name)
+01995 {
+01996 <span class="keywordflow">while</span> (cat)
+01997 {
+01998 <span class="keywordflow">if</span> (strcmp (name, cat-&gt;Name) == 0)
+01999 <span class="keywordflow">break</span>;
+02000 cat = cat-&gt;Next;
+02001 }
+02002 <span class="keywordflow">return</span> cat;
+02003 }
+02004
+02005 <span class="keyword">static</span> CLeak *insert (<span class="keyword">const</span> <span class="keywordtype">char</span> *name, CLeak *next)
+02006 {
+02007 <span class="keywordflow">return</span> <span class="keyword">new</span> CLeak (name, next);
+02008 }
+02009
+02010 <a class="code" href="a04558.html#a15">uint</a> Count;
+02011 <a class="code" href="a04558.html#a15">uint</a> Memory;
+02012 <span class="keywordtype">char</span> *Name;
+02013 CLeak *Next;
+02014 };
+02015
+02016 <span class="keywordtype">void</span> CHeapAllocator::debugReportMemoryLeak ()
+02017 {
+02018 debugPushCategoryString (NL_HEAP_MEM_DEBUG_CATEGORY);
+02019
+02020 <span class="comment">// Sum allocated memory</span>
+02021 <a class="code" href="a04558.html#a15">uint</a> memory = 0;
+02022
+02023 <span class="comment">// Leak map</span>
+02024 CLeak *leakMap = NULL;
+02025
+02026 <span class="comment">// Header</span>
+02027 <span class="keywordtype">char</span> <a class="code" href="a05378.html#a354">report</a>[2048];
+02028 sprintf (report, <span class="stringliteral">"Report Memory leak for allocator \"%s\"\n"</span>, _Name);
+02029 <a class="code" href="a05377.html#a5">CHeapAllocatorOutputError</a> (report);
+02030
+02031 <span class="comment">// For each small block</span>
+02032 CMainBlock *currentBlock = _MainBlockList;
+02033 <span class="keywordflow">while</span> (currentBlock)
+02034 {
+02035 <span class="comment">// Get the first node</span>
+02036 <span class="keyword">const</span> CNodeBegin *current = getFirstNode (currentBlock);
+02037 <span class="keywordflow">while</span> (current)
+02038 {
+02039 <span class="comment">// Check node</span>
+02040 checkNode (current, evalMagicNumber (current));
+02041
+02042 <span class="comment">// Node allocated ?</span>
+02043 <span class="keywordflow">if</span> (isNodeUsed (current) &amp;&amp; ( (current-&gt;Category == NULL) || (current-&gt;Category[0] != <span class="charliteral">'_'</span>)) )
+02044 {
+02045 <span class="comment">// Make a report</span>
+02046 sprintf (report, <span class="stringliteral">"%s(%d)\t: \"%s\""</span>, current-&gt;File, current-&gt;Line, current-&gt;Category);
+02047
+02048 <span class="comment">// Look for this leak</span>
+02049 CLeak *ite = CLeak::find (leakMap, report);
+02050
+02051 <span class="comment">// Not found ?</span>
+02052 <span class="keywordflow">if</span> (ite == NULL)
+02053 {
+02054 ite = CLeak::insert (report, leakMap);
+02055 leakMap = ite;
+02056 ite-&gt;Count = 0;
+02057 ite-&gt;Memory = 0;
+02058 }
+02059
+02060 <span class="comment">// One more leak</span>
+02061 ite-&gt;Count++;
+02062 ite-&gt;Memory += getNodeSize (current);
+02063
+02064 memory += getNodeSize (current);
+02065 }
+02066
+02067 <span class="comment">// Next node</span>
+02068 current = getNextNode (current);
+02069 }
+02070
+02071 <span class="comment">// Next block</span>
+02072 currentBlock = currentBlock-&gt;Next;
+02073 }
+02074
+02075 <span class="comment">// For each small block</span>
+02076 CSmallBlockPool *currentSB = (CSmallBlockPool *)_SmallBlockPool;
+02077 <span class="keywordflow">while</span> (currentSB)
+02078 {
+02079 <span class="comment">// For each node in this small block pool</span>
+02080 <a class="code" href="a04558.html#a15">uint</a> block;
+02081 <span class="keywordflow">for</span> (block=0; block&lt;SmallBlockPoolSize; block++)
+02082 {
+02083 <span class="comment">// Get the node</span>
+02084 <span class="keyword">const</span> CNodeBegin *current = getSmallBlock (currentSB, block);
+02085 <span class="comment">// Check node</span>
+02086 checkNode (current, evalMagicNumber (current));
+02087
+02088 <span class="comment">// Node allocated ?</span>
+02089 <span class="keywordflow">if</span> (isNodeUsed (current) &amp;&amp; ( (current-&gt;Category == NULL) || (current-&gt;Category[0] != <span class="charliteral">'_'</span>)) )
+02090 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_4" doxytag="NLMEMORY::CHeapAllocator::freeAll" ></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 NLMEMORY::CHeapAllocator::freeAll </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>
+Free all the block allocated
+<p>
+Definition at line <a class="el" href="a05775.html#l02788">2788</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1218_1" doxytag="NLMEMORY::CHeapAllocator::freeBlock" ></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 NLMEMORY::CHeapAllocator::freeBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>block</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Method used to free system memory
+<p>
+Definition at line <a class="el" href="a05775.html#l03046">3046</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_9" doxytag="NLMEMORY::CHeapAllocator::getAllocatedMemory" ></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> NLMEMORY::CHeapAllocator::getAllocatedMemory </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="a05775.html#l02096">2096</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>02099 {
+02100 ite = CLeak::insert (report, leakMap);
+02101 leakMap = ite;
+02102 ite-&gt;Count = 0;
+02103 ite-&gt;Memory = 0;
+02104 }
+02105
+02106 <span class="comment">// One more leak</span>
+02107 ite-&gt;Count++;
+02108 ite-&gt;Memory += <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_45">getNodeSize</a> (current);
+02109
+02110 memory += <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_45">getNodeSize</a> (current);
+02111 }
+02112 }
+02113
+02114 <span class="comment">// Next block</span>
+02115 currentSB = currentSB-&gt;Next;
+02116 }
+02117
+02118 <span class="comment">// Look for this leak</span>
+02119 CLeak *ite = leakMap;
+02120 <span class="keywordflow">while</span> (ite)
+02121 {
+02122 <span class="comment">// Make a report</span>
+02123 sprintf (report, <span class="stringliteral">"%s,\tLeak count : %d,\tMemory allocated : %d\n"</span>, ite-&gt;Name, ite-&gt;Count, ite-&gt;Memory);
+02124
+02125 <span class="comment">// Report on stderr</span>
+02126 <a class="code" href="a05377.html#a5">CHeapAllocatorOutputError</a> (report);
+02127
+02128 ite = ite-&gt;Next;
+02129 }
+02130
+02131 <span class="comment">// Make a report</span>
+02132 <span class="keywordflow">if</span> (memory)
+02133 {
+02134 sprintf (report, <span class="stringliteral">"%d byte(s) found\n"</span>, memory);
+02135 }
+02136 <span class="keywordflow">else</span>
+02137 {
+02138 sprintf (report, <span class="stringliteral">"No memory leak\n"</span>);
+02139 }
+02140 <a class="code" href="a05377.html#a5">CHeapAllocatorOutputError</a> (report);
+02141
+02142 <span class="comment">// Delete list</span>
+02143 <span class="keywordflow">if</span> (leakMap)
+02144 <span class="keyword">delete</span> leakMap;
+02145
+02146 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_0">debugPopCategoryString</a> ();
+02147 }
+02148 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+02149 <span class="preprocessor"></span>
+02150 <span class="comment">// *********************************************************</span>
+02151
+02152 <span class="keywordtype">bool</span> CHeapAllocator::checkHeap (<span class="keywordtype">bool</span> stopOnError)<span class="keyword"> const</span>
+02153 <span class="keyword"></span>{
+02154 <span class="keywordtype">bool</span> <a class="code" href="a04223.html#a643">res</a> = internalCheckHeap (stopOnError);
+02155
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_26" doxytag="NLMEMORY::CHeapAllocator::getAllocatedSystemMemory" ></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> NLMEMORY::CHeapAllocator::getAllocatedSystemMemory </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="a05775.html#l03230">3230</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_10" doxytag="NLMEMORY::CHeapAllocator::getAllocatedSystemMemoryByAllocator" ></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> NLMEMORY::CHeapAllocator::getAllocatedSystemMemoryByAllocator </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="a05775.html#l03279">3279</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_11" doxytag="NLMEMORY::CHeapAllocator::getBlockAllocationMode" ></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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">CHeapAllocator::TBlockAllocationMode</a> NLMEMORY::CHeapAllocator::getBlockAllocationMode </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<code> [inline]</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="a05775.html#l00871">871</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05777.html#l00324">NL_HEAP_NODE_END_SIZE</a>, <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00871 : <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory0">Align</a>);
+00872 <span class="keywordflow">if</span> (allignedSize &lt; <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory2">BlockDataSizeMin</a>)
+00873 allignedSize = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory2">BlockDataSizeMin</a>;
+00874
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_7" doxytag="NLMEMORY::CHeapAllocator::getBlockSize" ></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> NLMEMORY::CHeapAllocator::getBlockSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>block</em> </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>
+Get a block size with its pointer
+<p>
+Definition at line <a class="el" href="a05775.html#l01499">1499</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00645">size</a>.
+<p>
+<div class="fragment"><pre>01515 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_8" doxytag="NLMEMORY::CHeapAllocator::getCategory" ></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"> const char * NLMEMORY::CHeapAllocator::getCategory </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>block</em> </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>
+Get a block category from its pointer
+<p>
+Definition at line <a class="el" href="a05775.html#l01509">1509</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>01515 {
+01516 <span class="comment">// Get the first node</span>
+01517 <span class="keyword">const</span> <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_38">getFirstNode</a> (currentBlock);
+01518 <span class="keywordflow">while</span> (current)
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_37" doxytag="NLMEMORY::CHeapAllocator::getFirstNode" ></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="a02620.html">CHeapAllocator::CNodeBegin</a> * NLMEMORY::CHeapAllocator::getFirstNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02616.html">CMainBlock</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mainBlock</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00384">384</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05779.html#l00047">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a>, <a class="el" href="a05775.html#l00260">rotateRight()</a>, <a class="el" href="a05775.html#l00205">setNodeBlack()</a>, <a class="el" href="a05775.html#l00198">setNodeRed()</a>, <a class="el" href="a05646.html#l00236">w</a>, and <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+<div class="fragment"><pre>00386 {
+00387 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_53">setNodeBlack</a> (<a class="code" href="a04223.html#a575">w</a>);
+00388 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_57">setNodeRed</a> (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent);
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_38" doxytag="NLMEMORY::CHeapAllocator::getFirstNode" ></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"> const <a class="el" href="a02620.html">CHeapAllocator::CNodeBegin</a> * NLMEMORY::CHeapAllocator::getFirstNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02616.html">CMainBlock</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mainBlock</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00376">376</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00236">w</a>, and <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+<div class="fragment"><pre>00383 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_12" doxytag="NLMEMORY::CHeapAllocator::getFragmentationRatio" ></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"> float NLMEMORY::CHeapAllocator::getFragmentationRatio </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="a05775.html#l02747">2747</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_13" doxytag="NLMEMORY::CHeapAllocator::getFreeMemory" ></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> NLMEMORY::CHeapAllocator::getFreeMemory </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="a05775.html#l02628">2628</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_39" doxytag="NLMEMORY::CHeapAllocator::getFreeNode" ></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="a02614.html">CHeapAllocator::CFreeNode</a> * NLMEMORY::CHeapAllocator::getFreeNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00423">423</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_40" doxytag="NLMEMORY::CHeapAllocator::getFreeNode" ></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"> const <a class="el" href="a02614.html">CHeapAllocator::CFreeNode</a> * NLMEMORY::CHeapAllocator::getFreeNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00416">416</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00236">w</a>, and <a class="el" href="a05646.html#l00236">x</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_14" doxytag="NLMEMORY::CHeapAllocator::getMainBlockCount" ></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> NLMEMORY::CHeapAllocator::getMainBlockCount </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<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the block count
+<p>
+Definition at line <a class="el" href="a05775.html#l00808">808</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05983.html#l00072">NLMEMORY::line</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00837 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_15" doxytag="NLMEMORY::CHeapAllocator::getMainBlockSize" ></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> NLMEMORY::CHeapAllocator::getMainBlockSize </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<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the size of the block
+<p>
+Definition at line <a class="el" href="a05775.html#l00886">886</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00649">buffer</a>.
+<p>
+<div class="fragment"><pre>00888 {
+00889 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_19">leaveCriticalSectionLB</a> ();
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_16" doxytag="NLMEMORY::CHeapAllocator::getName" ></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"> const char * NLMEMORY::CHeapAllocator::getName </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<code> [inline]</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="a05775.html#l00879">879</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00649">buffer</a>.
+<p>
+<div class="fragment"><pre>00888 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_41" doxytag="NLMEMORY::CHeapAllocator::getNextNode" ></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="a02620.html">CHeapAllocator::CNodeBegin</a> * NLMEMORY::CHeapAllocator::getNextNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00404">404</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05775.html#l00214">rotateLeft()</a>, <a class="el" href="a05775.html#l00205">setNodeBlack()</a>, <a class="el" href="a05775.html#l00198">setNodeRed()</a>, <a class="el" href="a05646.html#l00236">w</a>, and <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+<div class="fragment"><pre>00405 {
+00406 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_53">setNodeBlack</a> (<a class="code" href="a04223.html#a575">w</a>-&gt;Right);
+00407 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_57">setNodeRed</a> (<a class="code" href="a04223.html#a575">w</a>);
+00408 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_21">rotateLeft</a> (<a class="code" href="a04223.html#a575">w</a>);
+00409 <a class="code" href="a04223.html#a575">w</a> = <a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Left;
+00410 }
+00411 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_54">setNodeColor</a> (<a class="code" href="a04223.html#a575">w</a>, isNodeRed (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent) );
+00412 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_53">setNodeBlack</a> (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent);
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_42" doxytag="NLMEMORY::CHeapAllocator::getNextNode" ></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"> const <a class="el" href="a02620.html">CHeapAllocator::CNodeBegin</a> * NLMEMORY::CHeapAllocator::getNextNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00392">392</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00236">w</a>, and <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+<div class="fragment"><pre>00396 {
+00397 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_57">setNodeRed</a> (<a class="code" href="a04223.html#a575">w</a>);
+00398 <a class="code" href="a04223.html#a572">x</a> = <a class="code" href="a04223.html#a572">x</a>-&gt;Parent;
+00399
+00400 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (<a class="code" href="a04223.html#a575">w</a>);
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_7" doxytag="NLMEMORY::CHeapAllocator::getNextSmallBlock" ></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="a02620.html">CHeapAllocator::CNodeBegin</a> * NLMEMORY::CHeapAllocator::getNextSmallBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>previous</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00903">903</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00917 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_43" doxytag="NLMEMORY::CHeapAllocator::getNode" ></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="a02620.html">CHeapAllocator::CNodeBegin</a> * NLMEMORY::CHeapAllocator::getNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00437">437</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory0">Align</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_5NLMEMORY_1_1CHeapAllocatory13">UserDataBlockSizeMin</a>.
+<p>
+<div class="fragment"><pre>00439 : <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory0">Align</a>);
+00440 <span class="keywordflow">if</span> (allignedSize &lt;= <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_5NLMEMORY_1_1CHeapAllocatory13">UserDataBlockSizeMin</a>)
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_44" doxytag="NLMEMORY::CHeapAllocator::getNode" ></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"> const <a class="el" href="a02620.html">CHeapAllocator::CNodeBegin</a> * NLMEMORY::CHeapAllocator::getNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00430">430</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05779.html#l00032">internalAssert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00434 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_45" doxytag="NLMEMORY::CHeapAllocator::getNodeSize" ></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> NLMEMORY::CHeapAllocator::getNodeSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00444">444</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05777.html#l00324">NL_HEAP_NODE_END_SIZE</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_17" doxytag="NLMEMORY::CHeapAllocator::getOutOfMemoryMode" ></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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">CHeapAllocator::TOutOfMemoryMode</a> NLMEMORY::CHeapAllocator::getOutOfMemoryMode </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<code> [inline]</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="a05775.html#l00853">853</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00855 {
+00856 <span class="comment">// Block allocation mode</span>
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_8" doxytag="NLMEMORY::CHeapAllocator::getSmallBlock" ></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="a02620.html">CHeapAllocator::CNodeBegin</a> * NLMEMORY::CHeapAllocator::getSmallBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02626.html">CSmallBlockPool</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>smallBlock</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>blockIndex</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, static, private]</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="a05775.html#l00896">896</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00899 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_18" doxytag="NLMEMORY::CHeapAllocator::getSmallBlockMemory" ></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> NLMEMORY::CHeapAllocator::getSmallBlockMemory </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="a05775.html#l02720">2720</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_19" doxytag="NLMEMORY::CHeapAllocator::getTotalMemoryUsed" ></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> NLMEMORY::CHeapAllocator::getTotalMemoryUsed </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="a05775.html#l02691">2691</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_15" doxytag="NLMEMORY::CHeapAllocator::initEmptyBlock" ></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 NLMEMORY::CHeapAllocator::initEmptyBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02616.html">CMainBlock</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mainBlock</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, private]</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="a05775.html#l01444">1444</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>01453 {
+01454 <span class="comment">// Status</span>
+01455 <span class="keywordtype">bool</span> status = <span class="keyword">false</span>;
+01456
+01457 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_1">debugPushCategoryString</a> (NL_HEAP_MEM_DEBUG_CATEGORY);
+01458
+01459 <span class="comment">// Open files</span>
+01460 FILE *<a class="code" href="a04115.html#a95">file</a> = fopen (stateFile, <span class="stringliteral">"wt"</span>);
+01461
+01462 <span class="comment">// List of category</span>
+01463 CCategoryMap *catMap = NULL;
+01464
+01465 <span class="comment">// Both OK</span>
+01466 <span class="keywordflow">if</span> (<a class="code" href="a04115.html#a95">file</a>)
+01467 {
+01468 <span class="comment">// **************************</span>
+01469
+01470 <span class="comment">// For each small block</span>
+01471 <a class="code" href="a04558.html#a15">uint</a> smallBlockCount = 0;
+01472 <a class="code" href="a04558.html#a15">uint</a> largeBlockCount = 0;
+01473 CSmallBlockPool *currentSB = (CSmallBlockPool *)<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_6">_SmallBlockPool</a>;
+01474 <span class="keywordflow">while</span> (currentSB)
+01475 {
+01476 <span class="comment">// For each node in this small block pool</span>
+01477 <a class="code" href="a04558.html#a15">uint</a> block;
+01478 <span class="keywordflow">for</span> (block=0; block&lt;<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_0NLMEMORY_1_1CHeapAllocatorw7">SmallBlockPoolSize</a>; block++)
+01479 {
+01480 <span class="comment">// Get the node</span>
+01481 <span class="keyword">const</span> <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_8">getSmallBlock</a> (currentSB, block);
+01482
+01483 <span class="comment">// Node allocated ?</span>
+01484 <span class="keywordflow">if</span> (<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_51">isNodeUsed</a> (current))
+01485 {
+01486 <span class="comment">// Find the node</span>
+01487 CCategoryMap *cat = CCategoryMap::find (catMap, (<span class="keyword">const</span> <span class="keywordtype">char</span>*)current-&gt;Category);
+01488
+01489 <span class="comment">// Found ?</span>
+01490 <span class="keywordflow">if</span> (cat == NULL)
+01491 {
+01492 catMap = CCategoryMap::insert (current-&gt;Category, catMap);
+01493 cat = catMap;
+01494 }
+01495 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_45">getNodeSize</a> (current) + <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_2NLMEMORY_1_1CHeapAllocatory10">ReleaseHeaderSize</a>;
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_16" doxytag="NLMEMORY::CHeapAllocator::insert" ></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 NLMEMORY::CHeapAllocator::insert </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>x</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, private]</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="a05775.html#l01005">1005</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05779.html#l00060">NL_ALLOC_STOP</a>.
+<p>
+<div class="fragment"><pre>01006 {
+01007 <span class="comment">// ********</span>
+01008 <span class="comment">// * STOP *</span>
+01009 <span class="comment">// ********</span>
+01010 <span class="comment">// * Attempt to allocate 0 bytes</span>
+01011 <span class="comment">// ********</span>
+01012 <a class="code" href="a04356.html#a3">NL_ALLOC_STOP</a>;
+01013 <span class="keywordflow">return</span> NULL;
+01014 }
+01015 }
+01016
+01017 <span class="comment">// *********************************************************</span>
+01018
+01019 <span class="keywordtype">void</span> CHeapAllocator::free (<span class="keywordtype">void</span> *ptr)
+01020 {
+01021 <span class="comment">// Delete a null pointer ?</span>
+01022 <span class="keywordflow">if</span> (ptr == NULL)
+01023 {
+01024 <span class="comment">// ********</span>
+01025 <span class="comment">// * STOP *</span>
+01026 <span class="comment">// ********</span>
+01027 <span class="comment">// * Attempt to delete a NULL pointer</span>
+01028 <span class="comment">// ********</span>
+01029 <span class="preprocessor">#ifdef NL_HEAP_STOP_NULL_FREE</span>
+01030 <span class="preprocessor"></span> <a class="code" href="a04356.html#a3">NL_ALLOC_STOP</a>;
+01031 <span class="preprocessor">#endif // NL_HEAP_STOP_NULL_FREE</span>
+01032 <span class="preprocessor"></span> }
+01033 <span class="keywordflow">else</span>
+01034 {
+01035
+01036 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01037 <span class="preprocessor"></span> <span class="comment">// Checks ?</span>
+01038 <span class="keywordflow">if</span> (_AlwaysCheck)
+01039 {
+01040 <span class="comment">// Check heap integrity</span>
+01041 internalCheckHeap (<span class="keyword">true</span>);
+01042 }
+01043 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01044 <span class="preprocessor"></span>
+01045 <span class="comment">// Get the node pointer</span>
+01046 CNodeBegin *node = (CNodeBegin*) ((<a class="code" href="a04558.html#a15">uint</a>)ptr - <span class="keyword">sizeof</span> (CNodeBegin));
+01047
+01048 <span class="comment">/* trap debug if (strcmp(getCategory(ptr),"3dIns") == 0)</span>
+01049 <span class="comment"> {</span>
+01050 <span class="comment"> n3dDrvTotal -= getNodeSize(node);</span>
+01051 <span class="comment"> uint dbg= 0;</span>
+01052 <span class="comment"> dbg++;</span>
+01053 <span class="comment"> } */</span>
+01054
+01055 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01056 <span class="preprocessor"></span> <span class="comment">// Check the node CRC</span>
+01057 enterCriticalSectionSB ();
+01058 enterCriticalSectionLB ();
+01059 checkNode (node, evalMagicNumber (node));
+01060 leaveCriticalSectionLB ();
+01061 leaveCriticalSectionSB ();
+01062 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01063 <span class="preprocessor"></span>
+01064 <span class="comment">// Large or small block ?</span>
+01065 <span class="preprocessor">#ifdef NL_HEAP_ALLOCATION_NDEBUG</span>
+01066 <span class="preprocessor"></span> <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = (((CNodeBegin*) ((<a class="code" href="a04558.html#a15">uint</a>)ptr - <span class="keyword">sizeof</span> (CNodeBegin))))-&gt;SizeAndFlags;
+01067 <span class="preprocessor">#else // NL_HEAP_ALLOCATION_NDEBUG</span>
+01068 <span class="preprocessor"></span> <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = getNodeSize (((CNodeBegin*) ((<a class="code" href="a04558.html#a15">uint</a>)ptr - <span class="keyword">sizeof</span> (CNodeBegin))));
+01069 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01070 <span class="preprocessor"></span> <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a587">size</a> &lt;= LastSmallBlock)
+01071 {
+01072 <span class="comment">// *******************</span>
+01073 <span class="comment">// Small block</span>
+01074 <span class="comment">// *******************</span>
+01075
+01076 <span class="comment">// Check the node has not been deleted</span>
+01077 <span class="keywordflow">if</span> (isNodeFree (node))
+01078 {
+01079 <span class="comment">// ********</span>
+01080 <span class="comment">// * STOP *</span>
+01081 <span class="comment">// ********</span>
+01082 <span class="comment">// * Attempt to delete a pointer already deleted</span>
+01083 <span class="comment">// ********</span>
+01084 <span class="comment">// * (*node): the already deleted node</span>
+01085 <span class="comment">// ********</span>
+01086 <a class="code" href="a04356.html#a3">NL_ALLOC_STOP</a>;
+01087 }
+01088 <span class="keywordflow">else</span>
+01089 {
+01090 enterCriticalSectionSB ();
+01091
+01092 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01093 <span class="preprocessor"></span> <span class="comment">// Uninitialised memory</span>
+01094 memset ((<a class="code" href="a04558.html#a7">uint8</a>*)node + <span class="keyword">sizeof</span>(CNodeBegin), DeletedMemory, size );
+01095
+01096 <span class="comment">// Set end pointers</span>
+01097 node-&gt;EndMagicNumber = (<a class="code" href="a04558.html#a11">uint32</a>*)((<a class="code" href="a04558.html#a7">uint8</a>*)node + <a class="code" href="a04223.html#a587">size</a> + <span class="keyword">sizeof</span> (CNodeBegin));
+01098
+01099 <span class="comment">// Mark has free</span>
+01100 setNodeFree (node);
+01101 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01102 <span class="preprocessor"></span>
+01103 <span class="comment">// Add in the free list</span>
+01104 CNodeBegin **freeNode = (CNodeBegin **)_FreeSmallBlocks+<a class="code" href="a04354.html#a4">NL_SIZE_TO_SMALLBLOCK_INDEX</a> (size);
+01105 ((CNodeBegin*) ((<a class="code" href="a04558.html#a15">uint</a>)ptr - <span class="keyword">sizeof</span> (CNodeBegin)))-&gt;Previous = *freeNode;
+01106 *freeNode = ((CNodeBegin*) ((<a class="code" href="a04558.html#a15">uint</a>)ptr - <span class="keyword">sizeof</span> (CNodeBegin)));
+01107
+01108 <span class="comment">// Update smallblock crc</span>
+01109 <a class="code" href="a04356.html#a1">NL_UPDATE_MAGIC_NUMBER</a> (node);
+01110
+01111 leaveCriticalSectionSB ();
+01112 }
+01113 }
+01114 <span class="keywordflow">else</span>
+01115 {
+01116 <span class="preprocessor">#ifdef NL_HEAP_ALLOCATION_NDEBUG</span>
+01117 <span class="preprocessor"></span> <span class="comment">// Get the real size</span>
+01118 <a class="code" href="a04223.html#a587">size</a> = getNodeSize (((CNodeBegin*) ((uint)ptr - <span class="keyword">sizeof</span> (CNodeBegin))));
+01119 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01120 <span class="preprocessor"></span>
+01121 <span class="comment">// Get the node pointer</span>
+01122 CNodeBegin *node = (CNodeBegin*) ((<a class="code" href="a04558.html#a15">uint</a>)ptr - <span class="keyword">sizeof</span> (CNodeBegin));
+01123
+01124 <span class="comment">// Check the node has not been deleted</span>
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_2" doxytag="NLMEMORY::CHeapAllocator::internalAllocateBlock" ></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#a7">uint8</a> * NLMEMORY::CHeapAllocator::internalAllocateBlock </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><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Method used to allocate system memory. Calls allocateBlock.
+<p>
+Definition at line <a class="el" href="a05775.html#l03337">3337</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_17" doxytag="NLMEMORY::CHeapAllocator::internalCheckHeap" ></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"> bool NLMEMORY::CHeapAllocator::internalCheckHeap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>stopOnError</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [private]</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="a05775.html#l03053">3053</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_46" doxytag="NLMEMORY::CHeapAllocator::isNodeBlack" ></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"> bool NLMEMORY::CHeapAllocator::isNodeBlack </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00145">145</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00340">computeCRC32()</a>.
+<p>
+<div class="fragment"><pre>00149 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_47" doxytag="NLMEMORY::CHeapAllocator::isNodeFree" ></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"> bool NLMEMORY::CHeapAllocator::isNodeFree </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00106">106</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_48" doxytag="NLMEMORY::CHeapAllocator::isNodeLast" ></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"> bool NLMEMORY::CHeapAllocator::isNodeLast </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00120">120</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05775.html#l02822">releaseMemory()</a>.
+<p>
+<div class="fragment"><pre>00121 {
+00122 <span class="comment">// Release all memory used</span>
+00123 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_5">releaseMemory</a> ();
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_49" doxytag="NLMEMORY::CHeapAllocator::isNodeRed" ></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"> bool NLMEMORY::CHeapAllocator::isNodeRed </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00138">138</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00340">computeCRC32()</a>, and <a class="el" href="a05775.html#l00166">setNodeLast()</a>.
+<p>
+<div class="fragment"><pre>00138 : current-&gt;Right;
+00139 }
+00140
+00141 <span class="comment">// Setup new node</span>
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_50" doxytag="NLMEMORY::CHeapAllocator::isNodeSmall" ></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"> bool NLMEMORY::CHeapAllocator::isNodeSmall </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00127">127</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05777.html#l00436">_FreeTreeRoot</a>, <a class="el" href="a05777.html#l00437">_NullNode</a>, <a class="el" href="a05777.html#l00421">NLMEMORY::CHeapAllocator::CNullNode::FreeNode</a>, and <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+<div class="fragment"><pre>00129 {
+00130 CHeapAllocator::CFreeNode *current, *parent;
+00131
+00132 <span class="comment">// Find future parent</span>
+00133 current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_28">_FreeTreeRoot</a>;
+00134 parent = NULL;
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_51" doxytag="NLMEMORY::CHeapAllocator::isNodeUsed" ></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"> bool NLMEMORY::CHeapAllocator::isNodeUsed </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00113">113</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_18" doxytag="NLMEMORY::CHeapAllocator::leaveCriticalSection" ></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 NLMEMORY::CHeapAllocator::leaveCriticalSection </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<code> [inline, private]</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="a05775.html#l00779">779</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00837 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_19" doxytag="NLMEMORY::CHeapAllocator::leaveCriticalSectionLB" ></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 NLMEMORY::CHeapAllocator::leaveCriticalSectionLB </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<code> [inline, private]</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="a05775.html#l00764">764</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00837 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_20" doxytag="NLMEMORY::CHeapAllocator::leaveCriticalSectionSB" ></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 NLMEMORY::CHeapAllocator::leaveCriticalSectionSB </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<code> [inline, private]</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="a05775.html#l00750">750</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_52" doxytag="NLMEMORY::CHeapAllocator::mergeNode" ></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 NLMEMORY::CHeapAllocator::mergeNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>node</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l01395">1395</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>01407 {
+01408
+01409 }
+01410
+01411 <span class="comment">// *********************************************************</span>
+01412
+01413 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01414 <span class="preprocessor"></span>
+01415 <span class="keyword">class </span>CCategoryMap
+01416 {
+01417 <span class="keyword">public</span>:
+01418 CCategoryMap (<span class="keyword">const</span> <span class="keywordtype">char</span> *name, CCategoryMap *next)
+01419 {
+01420 Name = name;
+01421 BlockCount = 0;
+01422 Size = 0;
+01423 Min = 0xffffffff;
+01424 Max = 0;
+01425 Next = next;
+01426 }
+01427
+01428 <span class="keyword">static</span> CCategoryMap *<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_14">find</a> (CCategoryMap *cat, <span class="keyword">const</span> <span class="keywordtype">char</span> *name)
+01429 {
+01430 <span class="keywordflow">while</span> (cat)
+01431 {
+01432 <span class="keywordflow">if</span> (strcmp (name, cat-&gt;Name) == 0)
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_3" doxytag="NLMEMORY::CHeapAllocator::outOfMemory" ></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 NLMEMORY::CHeapAllocator::outOfMemory </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> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Method used when no memory is available
+<p>
+Definition at line <a class="el" href="a05775.html#l03346">3346</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_1" doxytag="NLMEMORY::CHeapAllocator::reallocate" ></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* NLMEMORY::CHeapAllocator::reallocate </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void *&nbsp;</td>
+ <td class="mdname" nowrap> <em>ptr</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>size</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>sourceFile</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>line</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>category</em></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>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1216_5" doxytag="NLMEMORY::CHeapAllocator::releaseMemory" ></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 NLMEMORY::CHeapAllocator::releaseMemory </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>
+<dl compact><dt><b><a class="el" href="todo.html#_todo000028">Todo:</a></b></dt><dd>Free all the block allocated and release all the memory used by the allocator</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05775.html#l02822">2822</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00120">isNodeLast()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_21" doxytag="NLMEMORY::CHeapAllocator::rotateLeft" ></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 NLMEMORY::CHeapAllocator::rotateLeft </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>x</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, private]</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="a05775.html#l00214">214</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00340">computeCRC32()</a>, <a class="el" href="a05775.html#l00404">getNextNode()</a>, and <a class="el" href="a05775.html#l00188">setNodeColor()</a>.
+<p>
+<div class="fragment"><pre>00226 {
+00227 <span class="comment">// Uncle is Black</span>
+00228 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a572">x</a> == <a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Left)
+00229 {
+00230 <a class="code" href="a04223.html#a572">x</a> = <a class="code" href="a04223.html#a572">x</a>-&gt;Parent;
+00231 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_22">rotateRight</a>(x);
+00232 }
+00233 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_53">setNodeBlack</a> (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent);
+00234 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_57">setNodeRed</a> (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Parent);
+00235
+00236 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_21">rotateLeft</a> (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Parent);
+00237
+00238 <span class="comment">// Crc node</span>
+00239 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent);
+00240 }
+00241 }
+00242 }
+00243 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_53">setNodeBlack</a> (_FreeTreeRoot);
+00244
+00245 <span class="comment">// Crc node</span>
+00246 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (_FreeTreeRoot);
+00247 }
+00248
+00249 <span class="comment">// *********************************************************</span>
+00250
+00251 <span class="keywordtype">void</span> CHeapAllocator::erase (CHeapAllocator::CFreeNode *<a class="code" href="a04223.html#a574">z</a>)
+00252 {
+00253 CFreeNode *<a class="code" href="a04223.html#a572">x</a>, *<a class="code" href="a04223.html#a573">y</a>;
+00254 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a574">z</a>-&gt;Left == &amp;_NullNode.FreeNode || <a class="code" href="a04223.html#a574">z</a>-&gt;Right == &amp;_NullNode.FreeNode)
+00255 {
+00256 <span class="comment">// y has a NULL node as a child</span>
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_22" doxytag="NLMEMORY::CHeapAllocator::rotateRight" ></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 NLMEMORY::CHeapAllocator::rotateRight </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>x</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, private]</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="a05775.html#l00260">260</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05777.html#l00437">_NullNode</a>, <a class="el" href="a05777.html#l00421">NLMEMORY::CHeapAllocator::CNullNode::FreeNode</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a05646.html#l00236">z</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00340">computeCRC32()</a>, and <a class="el" href="a05775.html#l00384">getFirstNode()</a>.
+<p>
+<div class="fragment"><pre>00260 {
+00261 <span class="comment">// Find tree successor with a &amp;_NullNode.FreeNode node as a child</span>
+00262 <a class="code" href="a04223.html#a573">y</a> = <a class="code" href="a04223.html#a574">z</a>-&gt;Right;
+00263 <span class="keywordflow">while</span> (<a class="code" href="a04223.html#a573">y</a>-&gt;Left != &amp;<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_33">_NullNode</a>.<a class="code" href="a02624.html#NLMEMORY_1_1CHeapAllocator_1_1CNullNodeo0">FreeNode</a>)
+00264 <a class="code" href="a04223.html#a573">y</a> = <a class="code" href="a04223.html#a573">y</a>-&gt;Left;
+00265 }
+00266
+00267 <span class="comment">// x is y's only child</span>
+00268 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a>-&gt;Left != &amp;<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_33">_NullNode</a>.<a class="code" href="a02624.html#NLMEMORY_1_1CHeapAllocator_1_1CNullNodeo0">FreeNode</a>)
+00269 <a class="code" href="a04223.html#a572">x</a> = <a class="code" href="a04223.html#a573">y</a>-&gt;Left;
+00270 <span class="keywordflow">else</span>
+00271 <a class="code" href="a04223.html#a572">x</a> = <a class="code" href="a04223.html#a573">y</a>-&gt;Right;
+00272
+00273 <span class="comment">// Remove y from the parent chain</span>
+00274 <a class="code" href="a04223.html#a572">x</a>-&gt;Parent = <a class="code" href="a04223.html#a573">y</a>-&gt;Parent;
+00275
+00276 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a>-&gt;Parent)
+00277 {
+00278 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a> == <a class="code" href="a04223.html#a573">y</a>-&gt;Parent-&gt;Left)
+00279 <a class="code" href="a04223.html#a573">y</a>-&gt;Parent-&gt;Left = <a class="code" href="a04223.html#a572">x</a>;
+00280 <span class="keywordflow">else</span>
+00281 {
+00282 <a class="code" href="a04356.html#a0">internalAssert</a> (<a class="code" href="a04223.html#a573">y</a> == <a class="code" href="a04223.html#a573">y</a>-&gt;Parent-&gt;Right);
+00283 <a class="code" href="a04223.html#a573">y</a>-&gt;Parent-&gt;Right = <a class="code" href="a04223.html#a572">x</a>;
+00284 }
+00285 <a class="code" href="a04356.html#a2">NL_UPDATE_MAGIC_NUMBER_FREE_NODE</a> (<a class="code" href="a04223.html#a573">y</a>-&gt;Parent);
+00286 }
+00287 <span class="keywordflow">else</span>
+00288 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_28">_FreeTreeRoot</a> = <a class="code" href="a04223.html#a572">x</a>;
+00289
+00290 <span class="keywordtype">bool</span> yRed = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_49">isNodeRed</a> (<a class="code" href="a04223.html#a573">y</a>);
+00291
+00292 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a> != <a class="code" href="a04223.html#a574">z</a>)
+00293 {
+00294 <span class="comment">// Replace y by z</span>
+00295 *<a class="code" href="a04223.html#a573">y</a> = *<a class="code" href="a04223.html#a574">z</a>;
+00296 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_54">setNodeColor</a> (<a class="code" href="a04223.html#a573">y</a>, isNodeRed (z));
+00297 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a>-&gt;Parent)
+00298 {
+00299 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a>-&gt;Parent-&gt;Left == <a class="code" href="a04223.html#a574">z</a>)
+00300 {
+00301 <a class="code" href="a04223.html#a573">y</a>-&gt;Parent-&gt;Left = <a class="code" href="a04223.html#a573">y</a>;
+00302 }
+00303 <span class="keywordflow">else</span>
+00304 {
+00305 <a class="code" href="a04356.html#a0">internalAssert</a> (<a class="code" href="a04223.html#a573">y</a>-&gt;Parent-&gt;Right == z);
+00306 <a class="code" href="a04223.html#a573">y</a>-&gt;Parent-&gt;Right = <a class="code" href="a04223.html#a573">y</a>;
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_20" doxytag="NLMEMORY::CHeapAllocator::setBlockAllocationMode" ></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 NLMEMORY::CHeapAllocator::setBlockAllocationMode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">TBlockAllocationMode</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mode</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</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="a05775.html#l00860">860</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00871 : <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_4NLMEMORY_1_1CHeapAllocatory0">Align</a>);
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_21" doxytag="NLMEMORY::CHeapAllocator::setMainBlockCount" ></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"> bool NLMEMORY::CHeapAllocator::setMainBlockCount </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>blockCount</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>
+Set the block count </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_22" doxytag="NLMEMORY::CHeapAllocator::setMainBlockSize" ></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"> bool NLMEMORY::CHeapAllocator::setMainBlockSize </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>mainBlockSize</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>
+Returns false if the block size choosed i too big (&gt;= 1 Go) </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_23" doxytag="NLMEMORY::CHeapAllocator::setName" ></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 NLMEMORY::CHeapAllocator::setName </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const char *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>name</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>
+
+<p>
+Definition at line <a class="el" href="a05775.html#l03139">3139</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_9" doxytag="NLMEMORY::CHeapAllocator::setNextSmallBlock" ></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 NLMEMORY::CHeapAllocator::setNextSmallBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>previous</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>next</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, static, private]</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="a05775.html#l00910">910</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00917 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_53" doxytag="NLMEMORY::CHeapAllocator::setNodeBlack" ></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 NLMEMORY::CHeapAllocator::setNodeBlack </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00205">205</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00340">computeCRC32()</a>, <a class="el" href="a05775.html#l00384">getFirstNode()</a>, and <a class="el" href="a05775.html#l00404">getNextNode()</a>.
+<p>
+<div class="fragment"><pre>00208 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_54" doxytag="NLMEMORY::CHeapAllocator::setNodeColor" ></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 NLMEMORY::CHeapAllocator::setNodeColor </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>current</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>red</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, static, private]</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="a05775.html#l00188">188</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05775.html#l00214">rotateLeft()</a>, and <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00340">computeCRC32()</a>.
+<p>
+<div class="fragment"><pre>00188 {
+00189 <span class="comment">// Uncle is Black</span>
+00190 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a572">x</a> == <a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Right)
+00191 {
+00192 <span class="comment">// Make x a left child</span>
+00193 <a class="code" href="a04223.html#a572">x</a> = <a class="code" href="a04223.html#a572">x</a>-&gt;Parent;
+00194 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_21">rotateLeft</a>(<a class="code" href="a04223.html#a572">x</a>);
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_55" doxytag="NLMEMORY::CHeapAllocator::setNodeFree" ></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 NLMEMORY::CHeapAllocator::setNodeFree </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00152">152</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+<div class="fragment"><pre>00157 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_56" doxytag="NLMEMORY::CHeapAllocator::setNodeLast" ></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 NLMEMORY::CHeapAllocator::setNodeLast </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>current</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>last</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, static, private]</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="a05775.html#l00166">166</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05775.html#l00138">isNodeRed()</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+<div class="fragment"><pre>00168 {
+00169 <span class="comment">// We have a violation</span>
+00170 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a572">x</a>-&gt;Parent == <a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Parent-&gt;Left)
+00171 {
+00172 CHeapAllocator::CFreeNode *<a class="code" href="a04223.html#a573">y</a> = <a class="code" href="a04223.html#a572">x</a>-&gt;Parent-&gt;Parent-&gt;Right;
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_57" doxytag="NLMEMORY::CHeapAllocator::setNodeRed" ></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 NLMEMORY::CHeapAllocator::setNodeRed </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02614.html">CFreeNode</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00198">198</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00340">computeCRC32()</a>, <a class="el" href="a05775.html#l00384">getFirstNode()</a>, and <a class="el" href="a05775.html#l00404">getNextNode()</a>.
+<p>
+<div class="fragment"><pre>00208 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_58" doxytag="NLMEMORY::CHeapAllocator::setNodeSize" ></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 NLMEMORY::CHeapAllocator::setNodeSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>current</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>size</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, static, private]</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="a05775.html#l00176">176</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+<div class="fragment"><pre>00188 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_59" doxytag="NLMEMORY::CHeapAllocator::setNodeUsed" ></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 NLMEMORY::CHeapAllocator::setNodeUsed </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>current</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, private]</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="a05775.html#l00159">159</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>00168 {
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_24" doxytag="NLMEMORY::CHeapAllocator::setOutOfMemoryHook" ></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 NLMEMORY::CHeapAllocator::setOutOfMemoryHook </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void(*&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>outOfMemoryCallback</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>
+
+<p>
+Definition at line <a class="el" href="a05775.html#l03359">3359</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1217_25" doxytag="NLMEMORY::CHeapAllocator::setOutOfMemoryMode" ></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 NLMEMORY::CHeapAllocator::setOutOfMemoryMode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">TOutOfMemoryMode</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mode</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</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="a05775.html#l00842">842</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00645">size</a>.
+<p>
+<div class="fragment"><pre>00844 {
+00845 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_11">enterCriticalSectionLB</a> ();
+00846
+00847 <span class="comment">// Find a free node</span>
+00848 CHeapAllocator::CFreeNode *freeNode = CHeapAllocator::find (<a class="code" href="a04223.html#a587">size</a>);
+00849
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_23" doxytag="NLMEMORY::CHeapAllocator::splitNode" ></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="a02620.html">CHeapAllocator::CNodeBegin</a> * NLMEMORY::CHeapAllocator::splitNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02620.html">CNodeBegin</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>node</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>newSize</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, private]</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="a05775.html#l01310">1310</a> of file <a class="el" href="a05775.html">memory/heap_allocator.cpp</a>.
+<p>
+<div class="fragment"><pre>01315 {
+01316 <span class="comment">// Get the first node</span>
+01317 <span class="keyword">const</span> <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_60">CNodeBegin</a> *current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_38">getFirstNode</a> (currentBlock);
+01318 <span class="keywordflow">while</span> (current)
+01319 {
+01320 <span class="comment">// Node allocated ?</span>
+01321 <span class="keywordflow">if</span> ((<a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_51">isNodeUsed</a> (current)) &amp;&amp; (strcmp (current-&gt;Category, category)==0))
+01322 memory += <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_45">getNodeSize</a> (current);
+01323
+01324 <span class="comment">// Next node</span>
+01325 current = <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_42">getNextNode</a> (current);
+01326 }
+01327
+01328 <span class="comment">// Next block</span>
+01329 currentBlock = currentBlock-&gt;Next;
+01330 }
+01331
+01332 <a class="code" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_18">leaveCriticalSection</a> ();
+01333
+01334 <span class="comment">// Return memory used</span>
+01335 <span class="keywordflow">return</span> memory;
+01336 }
+01337 <span class="preprocessor">#endif // NL_HEAP_ALLOCATION_NDEBUG</span>
+01338 <span class="preprocessor"></span>
+01339 <span class="comment">// *********************************************************</span>
+01340
+01341 <span class="preprocessor">#ifndef NL_HEAP_ALLOCATION_NDEBUG</span>
+01342 <span class="preprocessor"></span><a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::debugGetDebugInfoSize ()<span class="keyword"> const</span>
+01343 <span class="keyword"></span>{
+01344 <span class="comment">// Return memory used</span>
+01345 <span class="keywordflow">return</span> debugGetSBDebugInfoSize () + debugGetLBDebugInfoSize ();
+01346 }
+01347
+01348 <a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::debugGetLBDebugInfoSize ()<span class="keyword"> const</span>
+01349 <span class="keyword"></span>{
+01350 enterCriticalSection ();
+01351
+01352 <span class="comment">// Sum memory used by debug header</span>
+01353 <a class="code" href="a04558.html#a15">uint</a> memory = 0;
+01354
+01355 <span class="comment">// For each main block</span>
+01356 CMainBlock *currentBlock = _MainBlockList;
+01357 <span class="keywordflow">while</span> (currentBlock)
+01358 {
+01359 <span class="comment">// Get the first node</span>
+01360 <span class="keyword">const</span> CNodeBegin *current = getFirstNode (currentBlock);
+01361 <span class="keywordflow">while</span> (current)
+01362 {
+01363 <span class="comment">// Node allocated ?</span>
+01364 memory += <span class="keyword">sizeof</span>(CNodeBegin) - ReleaseHeaderSize + <span class="keyword">sizeof</span>(CNodeEnd);
+01365
+01366 <span class="comment">// Next node</span>
+01367 current = getNextNode (current);
+01368 }
+01369
+01370 <span class="comment">// Next block</span>
+01371 currentBlock = currentBlock-&gt;Next;
+01372 }
+01373
+01374 leaveCriticalSection ();
+01375
+01376 <span class="comment">// Return memory used</span>
+01377 <span class="keywordflow">return</span> memory;
+01378 }
+01379
+01380 <a class="code" href="a04558.html#a15">uint</a> CHeapAllocator::debugGetSBDebugInfoSize ()<span class="keyword"> const</span>
+01381 <span class="keyword"></span>{
+01382 enterCriticalSection ();
+01383
+01384 <span class="comment">// Sum memory used by debug header</span>
+01385 <a class="code" href="a04558.html#a15">uint</a> memory = 0;
+01386
+01387 <span class="comment">// For each small blocks</span>
+01388 CSmallBlockPool *pool = (CSmallBlockPool*)_SmallBlockPool;
+01389 <span class="keywordflow">while</span> (pool)
+01390 {
+01391 memory += SmallBlockPoolSize * (<span class="keyword">sizeof</span>(CNodeBegin) - ReleaseHeaderSize + <span class="keyword">sizeof</span>(CNodeEnd));
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_60" doxytag="NLMEMORY::CHeapAllocator::CNodeBegin" ></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"> friend struct <a class="el" href="a02620.html">CNodeBegin</a><code> [friend]</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="a05777.html#l00274">274</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_24" doxytag="NLMEMORY::CHeapAllocator::_AllocateCount" ></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#a11">uint32</a> <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_24">NLMEMORY::CHeapAllocator::_AllocateCount</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="a05777.html#l00442">442</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_25" doxytag="NLMEMORY::CHeapAllocator::_AlwaysCheck" ></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"> bool <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_25">NLMEMORY::CHeapAllocator::_AlwaysCheck</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="a05777.html#l00429">429</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_26" doxytag="NLMEMORY::CHeapAllocator::_BlockAllocationMode" ></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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_0">TBlockAllocationMode</a> <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_26">NLMEMORY::CHeapAllocator::_BlockAllocationMode</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="a05777.html#l00426">426</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_27" doxytag="NLMEMORY::CHeapAllocator::_BlockCount" ></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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_27">NLMEMORY::CHeapAllocator::_BlockCount</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="a05777.html#l00425">425</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1221_2" doxytag="NLMEMORY::CHeapAllocator::_CategoryStack" ></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="a02856.html">CMemoryTDS</a> <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_2">NLMEMORY::CHeapAllocator::_CategoryStack</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="a05777.html#l00533">533</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_4" doxytag="NLMEMORY::CHeapAllocator::_FreeSmallBlocks" ></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"> volatile <a class="el" href="a02620.html">CNodeBegin</a>* <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_4">NLMEMORY::CHeapAllocator::_FreeSmallBlocks</a>[ (1+(LastSmallBlock - FirstSmallBlock)/SmallBlockGranularity) ]<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="a05777.html#l00506">506</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_28" doxytag="NLMEMORY::CHeapAllocator::_FreeTreeRoot" ></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="a02614.html">CFreeNode</a>* <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_28">NLMEMORY::CHeapAllocator::_FreeTreeRoot</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="a05777.html#l00436">436</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00127">isNodeSmall()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_29" doxytag="NLMEMORY::CHeapAllocator::_MainBlockList" ></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="a02616.html">CMainBlock</a>* <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_29">NLMEMORY::CHeapAllocator::_MainBlockList</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="a05777.html#l00433">433</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_30" doxytag="NLMEMORY::CHeapAllocator::_MainBlockSize" ></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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_30">NLMEMORY::CHeapAllocator::_MainBlockSize</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="a05777.html#l00424">424</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_31" doxytag="NLMEMORY::CHeapAllocator::_MutexLB" ></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="a02855.html">CMemoryMutex</a> <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_31">NLMEMORY::CHeapAllocator::_MutexLB</a><code> [mutable, 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="a05777.html#l00438">438</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_5" doxytag="NLMEMORY::CHeapAllocator::_MutexSB" ></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="a02855.html">CMemoryMutex</a> <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_5">NLMEMORY::CHeapAllocator::_MutexSB</a><code> [mutable, 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="a05777.html#l00509">509</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_32" doxytag="NLMEMORY::CHeapAllocator::_Name" ></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"> char <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_32">NLMEMORY::CHeapAllocator::_Name</a>[NameLength]<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="a05777.html#l00440">440</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_33" doxytag="NLMEMORY::CHeapAllocator::_NullNode" ></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="a02624.html">CNullNode</a> <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_33">NLMEMORY::CHeapAllocator::_NullNode</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="a05777.html#l00437">437</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>.
+<p>
+Referenced by <a class="el" href="a05775.html#l00127">isNodeSmall()</a>, and <a class="el" href="a05775.html#l00260">rotateRight()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1221_3" doxytag="NLMEMORY::CHeapAllocator::_OutOfMemoryCallback" ></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(* <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1221_3">NLMEMORY::CHeapAllocator::_OutOfMemoryCallback</a>)()<code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1219_34" doxytag="NLMEMORY::CHeapAllocator::_OutOfMemoryMode" ></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="a02610.html#NLMEMORY_1_1CHeapAllocatorz1216_1">TOutOfMemoryMode</a> <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1219_34">NLMEMORY::CHeapAllocator::_OutOfMemoryMode</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="a05777.html#l00427">427</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMEMORY_1_1CHeapAllocatorz1220_6" doxytag="NLMEMORY::CHeapAllocator::_SmallBlockPool" ></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"> volatile <a class="el" href="a02626.html">CSmallBlockPool</a>* <a class="el" href="a02610.html#NLMEMORY_1_1CHeapAllocatorz1220_6">NLMEMORY::CHeapAllocator::_SmallBlockPool</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="a05777.html#l00507">507</a> of file <a class="el" href="a05777.html">src/memory/heap_allocator.h</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a05777.html">src/memory/heap_allocator.h</a><li><a class="el" href="a05775.html">memory/heap_allocator.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 12:56:17 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>