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 <title>Alloc</title> 8 </head> 9 <body> 10 <h1><CODE><a href="../../../nw/Overview.html">nw</a>::<a href="../../../nw/demo/Overview.html">demo</a>::<a href="../../../nw/demo/DemoAllocator/Overview.html">DemoAllocator</a>::Alloc</CODE> Member Function</h1> 11 <h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14virtual void * Alloc( 15 size_t size, 16 <span>u8</span> alignment 17); 18</pre> 19 </div> 20 <h2>Arguments</h2> 21 <div class="section"> 22 <table class="arguments"> 23 <thead> 24 <tr> 25 <td width="15" /> 26 <th>Name</th> 27 <td>Description</td> 28 </tr> 29 </thead> 30 <tr> 31 <td>in</td> 32 <th><CODE>size</CODE></th> 33 <td>Memory size to be allocated.</td> 34 </tr> 35 <tr> 36 <td>in</td> 37 <th>alignment</th> 38 <td>Alignment.</td> 39 </tr> </table> 40 </div> 41 <h2>Return Values</h2> 42 <div class="section">Returns the allocated memory address. </div> 43 <h2>Description</h2> 44 <div class="section"> 45 <p>Allocates memory from main memory.</p> 46 </div> 47 <h1><CODE><a href="../../../nw/Overview.html">nw</a>::<a href="../../../nw/demo/Overview.html">demo</a>::<a href="../../../nw/demo/DemoAllocator/Overview.html">DemoAllocator</a>::Alloc</CODE> Member Function</h1> 48 <h2>Syntax</h2> 49 <div class="section"> 50 <pre class="definition"> 51void * Alloc( 52 size_t size 53); 54template <typename TObject> 55TObject * Alloc( 56 int count, 57 <span>u8</span> alignment = <a href="../../../nw/os/IAllocator/DEFAULT_ALIGNMENT.html">DEFAULT_ALIGNMENT</a> 58); 59</pre> 60 </div> 61 <h2>List of Overloaded Member Functions</h2> 62 <div class="section"> 63 <table class="members"> 64 <tr> 65 <td> 66 <a href="./Alloc(0).html">Alloc ( size_t ) </a> 67 </td> 68 <td>Allocates memory when the alignment specification has been omitted.</td> 69 </tr> 70 <tr> 71 <td> 72 <a href="./Alloc(1).html">Alloc ( int, u8 ) </a> 73 </td> 74 <td>Allocates the memory needed for the specified number of objects.</td> 75 </tr> </table> 76 </div> 77 <h2>Description of Alloc ( size_t )</h2> 78 <div class="section"><p>Note that overload of the base class is hidden if override of <CODE>Alloc(size, alignment)</CODE> is defined for a derivative class. To directly use this function from a reference to a sub-class, describe this code: <CODE><a href="../../../nw/os/IAllocator/Alloc.html">IAllocator::Alloc</a>; </CODE></p></div> 79 <h2>Description of Alloc ( int, u8 ) </h2> 80 <div class="section"> 81 <p>Allocates the memory needed for the specified number of objects.</p> 82 </div> 83 <hr><p>CONFIDENTIAL</p></body> 84</html> 85