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><CODE>nw::demo::DemoAllocator</CODE> Class</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>The default value when the alignment specification has been omitted.(Derives from <CODE><a href="../../../nw/os/IAllocator/Overview.html">IAllocator</a></CODE>.</td> 72 </tr> 73 <tr> 74 <td width="100"> 75 <span class="static_style" title="static">S</span> 76 </td> 77 <th> 78 <span class="argument"><a href="../../../nw/os/IAllocator/CACHE_LINE_ALIGNMENT.html">CACHE_LINE_ALIGNMENT</a></span> 79 </th> 80 <td>Cache alignment.(Derives from <CODE><a href="../../../nw/os/IAllocator/Overview.html">IAllocator</a></CODE>.</td> 81 </tr> </table> 82 </div> 83 </a> <a name="function" id="function"> 84 <h2>Member Functions</h2> 85 <div class="section"> 86 <table class="members"> 87 <tr> 88 <th class="category" colspan="3">Create/Destroy</th> 89 </tr> 90 <tr> 91 <td width="100"> </td> 92 <th> 93 <a href="../../../nw/demo/DemoAllocator/Initialize.html"><CODE>Initialize</CODE></a> 94 </th> 95 <td>Initializes the demo allocator. Initializes the expanded heap internally.</td> 96 </tr> 97 <tr> 98 <td width="100"> </td> 99 <th> 100 <a href="../../../nw/demo/DemoAllocator/Finalize.html"><CODE>Finalize</CODE></a> 101 </th> 102 <td>Destroys the demo allocator.</td> 103 </tr> 104 <tr> 105 <th class="category" colspan="3">Allocating and Freeing Memory</th> 106 </tr> 107 <tr> 108 <td width="100"> <span class="virtual_style" title="virtual">V</span> 109 </td> 110 <th> 111 <a href="../../../nw/demo/DemoAllocator/Alloc.html">Alloc</a> 112 </th> 113 <td>Allocates memory from main memory.</td> 114 </tr> 115 <tr> 116 <td width="100"> <span class="virtual_style" title="virtual">V</span> 117 </td> 118 <th> 119 <a href="../../../nw/demo/DemoAllocator/Free.html">Free</a> 120 </th> 121 <td>Returns memory back to main memory.</td> 122 </tr> 123 <tr> 124 <th class="category" colspan="3">Debug</th> 125 </tr> 126 <tr> 127 <td width="100"> </td> 128 <th> 129 <a href="../../../nw/demo/DemoAllocator/GetFreeSize.html">GetFreeSize</a> 130 </th> 131 <td>Gets the empty memory size.</td> 132 </tr> 133 <tr> 134 <td width="100"> </td> 135 <th> 136 <a href="../../../nw/demo/DemoAllocator/GetMemoryBlockSize.html">GetMemoryBlockSize</a> 137 </th> 138 <td>Returns the size of the allocated memory block.</td> 139 </tr> 140 <tr> 141 <td width="100"> </td> 142 <th> 143 <a href="../../../nw/demo/DemoAllocator/Dump.html"><CODE>Dump</CODE></a> 144 </th> 145 <td>Displays the status of main memory.</td> 146 </tr> 147 <tr> 148 <td width="100"> </td> 149 <th> 150 <a href="../../../nw/demo/DemoAllocator/SetBreakAlloc.html">SetBreakAlloc</a> 151 </th> 152 <td>Sets the the stop conditions when allocating memory.</td> 153 </tr> 154 <tr> 155 <td width="100"> </td> 156 <th> 157 <a href="../../../nw/demo/DemoAllocator/SetBreakFree.html">SetBreakFree</a> 158 </th> 159 <td>Sets the the stop conditions when freeing memory.</td> 160 </tr> 161 <tr> 162 <th class="category" colspan="3">Utilities</th> 163 </tr> 164 <tr> 165 <td width="100"> </td> 166 <th> 167 <a href="../../../nw/demo/DemoAllocator/Alloc.html">Alloc</a> 168 </th> 169 <td>Allocates memory when the alignment specification has been omitted.</td> 170 </tr> 171 <tr> 172 <td width="100"> </td> 173 <th> 174 <a href="../../../nw/os/IAllocator/AllocAndClear.html">AllocAndClear</a> 175 </th> 176 <td>Allocates memory and clears with the specified byte data.(Derives from <CODE><a href="../../../nw/os/IAllocator/Overview.html">IAllocator</a></CODE>.</td> 177 </tr> 178 <tr> 179 <td width="100"> </td> 180 <th> 181 <a href="../../../nw/os/IAllocator/AllocAndConstruct.html">AllocAndConstruct</a> 182 </th> 183 <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> 184 </tr> 185 <tr> 186 <td width="100"> </td> 187 <th> 188 <a href="../../../nw/os/IAllocator/AllocAndFill.html">AllocAndFill</a> 189 </th> 190 <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> 191 </tr> 192 <tr> 193 <td width="100"> </td> 194 <th> 195 <a href="../../../nw/os/IAllocator/DestructAndFree.html">DestructAndFree</a> 196 </th> 197 <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> 198 </tr> 199 <tr> 200 <th class="category" colspan="3">Other</th> 201 </tr> 202 <tr> 203 <td width="100"> </td> 204 <th> 205 <a href="../../../nw/demo/DemoAllocator/DemoAllocator.html">DemoAllocator</a> 206 </th> 207 <td>Constructor.</td> 208 </tr> 209 <tr> 210 <td width="100"> </td> 211 <th> 212 <a href="../../../nw/demo/DemoAllocator/GetStartAddress.html"><CODE>GetStartAddress</CODE></a> 213 </th> 214 <td>Gets the start address specified at the time of initialization.</td> 215 </tr> </table> 216 </div> 217 </a> 218 <h2>Class Hierarchy</h2> 219 <div class="section"> 220 <p class="hierarchy"><a href="../../../nw/os/IAllocator/Overview.html">nw::os::IAllocator</a><br /> <b>nw::demo::DemoAllocator</b> 221 </p> 222 </div> 223 <hr><p>CONFIDENTIAL</p></body> 224</html> 225