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>nw::demo::DemoAllocator::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>nw::demo::DemoAllocator::Alloc</CODE> Member Function</h1> 48 <h2>Syntax</h2> 49 <div class="section"> 50 <pre class="definition"> 51void * Alloc( 52 size_t size 53); 54</pre> 55 </div> 56 <h2>Arguments</h2> 57 <div class="section"> 58 <table class="arguments"> 59 <thead> 60 <tr> 61 <td width="15" /> 62 <th>Name</th> 63 <td>Description</td> 64 </tr> 65 </thead> 66 <tr> 67 <td /> 68 <th><CODE>size</CODE></th> 69 <td> 70 </td> 71 </tr> </table> 72 </div> 73 <h2>Return Values</h2> 74 <div class="section"> </div> 75 <h2>Description</h2> 76 <div class="section"> 77 <p>Allocates memory when the alignment specification has been omitted.</p><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> 78 <hr><p>CONFIDENTIAL</p></body> 79</html>