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