1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" /> 7 <style type="text/css"><!-- 8 span.static_style 9 { 10 font-size : 8pt; 11 color : white; 12 font-weight : bold; 13 background : #44f; 14 border-left : solid 1px #aaf; 15 border-top : solid 1px #aaf; 16 border-right : solid 1px #00c; 17 border-bottom : solid 1px #00c; 18 padding-left : 2px; 19 padding-right : 2px; 20 } 21 span.virtual_style 22 { 23 font-size : 8pt; 24 color : white; 25 font-weight : bold; 26 background : #0a0; 27 border-left : solid 1px #0f0; 28 border-top : solid 1px #0f0; 29 border-right : solid 1px #060; 30 border-bottom : solid 1px #060; 31 padding-left : 2px; 32 padding-right : 2px; 33 } 34 span.protected_style 35 { 36 font-size : 8pt; 37 color : white; 38 font-weight : bold; 39 background : #444; 40 border-left : solid 1px #ccc; 41 border-top : solid 1px #ccc; 42 border-right : solid 1px #222; 43 border-bottom : solid 1px #222; 44 padding-left : 2px; 45 padding-right : 2px; 46 } 47 --></style> 48 <title>nw::demo::DemoAllocator</title> 49 </head> 50 <body> 51 <h1><a href="../../../nw/Overview.html">nw</a>::<a href="../../../nw/demo/Overview.html">demo</a>::DemoAllocator Clas</h1> 52 <h2>Syntax</h2> 53 <div class="section"> 54 <pre class="definition">class DemoAllocator : public <a href="../../../nw/os/IAllocator/Overview.html">nw::os::IAllocator</a></pre> 55 </div> 56 <h2>Description</h2> 57 <div class="section"> 58 <p>Main memory allocator for demos.</p> 59 </div> 60 <a name="constant" id="constant"> 61 <h2>Member Constants</h2> 62 <div class="section"> 63 <table class="members"> 64 <tr> 65 <td width="100"> 66 <span class="static_style" title="static">S</span> 67 </td> 68 <th> 69 <span class="argument"><a href="../../../nw/os/IAllocator/DEFAULT_ALIGNMENT.html">DEFAULT_ALIGNMENT</a></span> 70 </th> 71 <td width="100"><CODE>const int</CODE></td> 72 <td>The default value when the alignment specification has been omitted.(Derives from <CODE><a href="../../../nw/os/IAllocator/Overview.html">IAllocator</a></CODE>.</td> 73 </tr> 74 <tr> 75 <td width="100"> 76 <span class="static_style" title="static">S</span> 77 </td> 78 <th> 79 <span class="argument"><a href="../../../nw/os/IAllocator/CACHE_LINE_ALIGNMENT.html">CACHE_LINE_ALIGNMENT</a></span> 80 </th> 81 <td width="100"><CODE>const int</CODE></td> 82 <td>Cache alignment.(Derives from <CODE><a href="../../../nw/os/IAllocator/Overview.html">IAllocator</a></CODE>.</td> 83 </tr> </table> 84 </div> 85 </a> <a name="function" id="function"> 86 <h2>Member Functions</h2> 87 <div class="section"> 88 <table class="members"> 89 <tr> 90 <th class="category" colspan="3">Create/Destroy</th> 91 </tr> 92 <tr> 93 <td width="100"> </td> 94 <th> 95 <a href="../../../nw/demo/DemoAllocator/Initialize.html"><CODE>Initialize</CODE></a> 96 </th> 97 <td>Initializes the demo allocator. Initializes the expanded heap internally.</td> 98 </tr> 99 <tr> 100 <td width="100"> </td> 101 <th> 102 <a href="../../../nw/demo/DemoAllocator/Finalize.html">Finalize</a> 103 </th> 104 <td>Destroys the demo allocator.</td> 105 </tr> 106 <tr> 107 <th class="category" colspan="3">Allocating and Freeing Memory</th> 108 </tr> 109 <tr> 110 <td width="100"> <span class="virtual_style" title="virtual">V</span> 111 </td> 112 <th> 113 <a href="../../../nw/demo/DemoAllocator/Alloc.html">Alloc</a> 114 </th> 115 <td>Allocates memory from main memory.</td> 116 </tr> 117 <tr> 118 <td width="100"> <span class="virtual_style" title="virtual">V</span> 119 </td> 120 <th> 121 <a href="../../../nw/demo/DemoAllocator/Free.html">Free</a> 122 </th> 123 <td>Returns memory back to main memory.</td> 124 </tr> 125 <tr> 126 <th class="category" colspan="3">Debug</th> 127 </tr> 128 <tr> 129 <td width="100"> </td> 130 <th> 131 <a href="../../../nw/demo/DemoAllocator/GetFreeSize.html">GetFreeSize</a> 132 </th> 133 <td>Gets the empty memory size.</td> 134 </tr> 135 <tr> 136 <td width="100"> </td> 137 <th> 138 <a href="../../../nw/demo/DemoAllocator/GetTotalSize.html">GetTotalSize</a> 139 </th> 140 <td>Returns the allocated memory size.</td> 141 </tr> 142 <tr> 143 <td width="100"> </td> 144 <th> 145 <a href="../../../nw/demo/DemoAllocator/GetMemoryBlockSize.html">GetMemoryBlockSize</a> 146 </th> 147 <td>Returns the size of the allocated memory block.</td> 148 </tr> 149 <tr> 150 <td width="100"> </td> 151 <th> 152 <a href="../../../nw/demo/DemoAllocator/Dump.html">Dump</a> 153 </th> 154 <td>Displays the status of main memory.</td> 155 </tr> 156 <tr> 157 <td width="100"> </td> 158 <th> 159 <a href="../../../nw/demo/DemoAllocator/SetBreakAlloc.html">SetBreakAlloc</a> 160 </th> 161 <td>Sets the the stop conditions when allocating memory.</td> 162 </tr> 163 <tr> 164 <td width="100"> </td> 165 <th> 166 <a href="../../../nw/demo/DemoAllocator/SetBreakFree.html">SetBreakFree</a> 167 </th> 168 <td>Sets the the stop conditions when freeing memory.</td> 169 </tr> 170 <tr> 171 <th class="category" colspan="3">Utilities</th> 172 </tr> 173 <tr> 174 <td width="100"> </td> 175 <th> 176 <a href="../../../nw/demo/DemoAllocator/Alloc.html">Alloc</a> 177 </th> 178 <td>Allocates memory when the alignment specification has been omitted.</td> 179 </tr> 180 <tr> 181 <td width="100"> </td> 182 <th> 183 <a href="../../../nw/os/IAllocator/AllocAndClear.html">AllocAndClear</a> 184 </th> 185 <td>Allocates memory and clears with the specified byte data.(Derives from <CODE><a href="../../../nw/os/IAllocator/Overview.html">IAllocator</a></CODE>.</td> 186 </tr> 187 <tr> 188 <td width="100"> </td> 189 <th> 190 <a href="../../../nw/os/IAllocator/AllocAndConstruct.html">AllocAndConstruct</a> 191 </th> 192 <td>Allocates the memory required for the specified number of objects and calls a constructor.(Derives from <CODE><a href="../../../nw/os/IAllocator/Overview.html">IAllocator</a></CODE>.</td> 193 </tr> 194 <tr> 195 <td width="100"> </td> 196 <th> 197 <a href="../../../nw/os/IAllocator/AllocAndFill.html">AllocAndFill</a> 198 </th> 199 <td>Allocates the memory required for the specified number of objects and copies the specified object.(Derives from <CODE><a href="../../../nw/os/IAllocator/Overview.html">IAllocator</a></CODE>.</td> 200 </tr> 201 <tr> 202 <td width="100"> </td> 203 <th> 204 <a href="../../../nw/os/IAllocator/DestructAndFree.html">DestructAndFree</a> 205 </th> 206 <td>Calls a destructor for the specified number of objects and frees memory.(Derives from <CODE><a href="../../../nw/os/IAllocator/Overview.html">IAllocator</a></CODE>.</td> 207 </tr> 208 <tr> 209 <th class="category" colspan="3">Other</th> 210 </tr> 211 <tr> 212 <td width="100"> </td> 213 <th> 214 <a href="../../../nw/demo/DemoAllocator/DemoAllocator.html">DemoAllocator</a> 215 </th> 216 <td>Constructor.</td> 217 </tr> 218 <tr> 219 <td width="100"> </td> 220 <th> 221 <a href="../../../nw/demo/DemoAllocator/GetStartAddress.html"><CODE>GetStartAddress</CODE></a> 222 </th> 223 <td>Gets the start address specified at the time of initialization.</td> 224 </tr> </table> 225 </div> 226 </a> 227 <h2>Class Hierarchy</h2> 228 <div class="section"> 229 <p class="hierarchy"><a href="../../../nw/os/IAllocator/Overview.html">nw::os::IAllocator</a><br /> <b>nw::demo::DemoAllocator</b> 230 </p> 231 </div> 232 <hr><p>CONFIDENTIAL</p></body> 233</html> 234