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>Create</title> 8 </head> 9 <body> 10<h1><CODE>nn::fnd::FrameHeapTemplate::Create</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static <a href="../../../nn/fnd/FrameHeapTemplate/Overview.html">FrameHeapTemplate</a> * Create( 15 <a href="../../../nn/fnd/HeapBase/Overview.html">HeapBase</a> * parent, 16 void * addr, 17 size_t size, 18 bit32 option = 0, 19 bit32 placement = HEAP_INFOPLACEMENT_HEAD 20); 21</pre> 22 </div> 23<h2>Arguments</h2> 24 <div class="section"> 25 <table class="arguments"> 26 <thead> 27 <tr> 28 <td width="15" /> 29<th>Name</th> 30<td>Description</td> 31 </tr> 32 </thead> 33 <tr> 34<td>in</td> 35<th>parent</th> 36<td>Specifies the parent heap whose region contains <SPAN class="argument">addr</SPAN>.</td> 37 </tr> 38 <tr> 39<td>in</td> 40<th>addr</th> 41<td>The starting address of the memory block to allocate to the frame heap. Specify a memory block that has been allocated within the heap specified by <SPAN class="argument">parent</SPAN>.</td> 42 </tr> 43 <tr> 44<td>in</td> 45<th>size</th> 46<td>The size of the memory block to allocate to the frame heap.</td> 47 </tr> 48 <tr> 49<td>in</td> 50<th>option</th> 51<td>Specifies options. (Not yet implemented.)</td> 52 </tr> 53 <tr> 54<td>in</td> 55<th>placement</th> 56<td>Specifies the location where the management region (<CODE>FrameHeap</CODE> object) is located.</td> 57 </tr> </table> 58 </div> 59<h2>Return Values</h2> 60<div class="section">Returns the created heap. </div> 61<h2>Description</h2> 62 <div class="section"> 63<p>Creates a frame heap within a parent heap.</p><p>Heaps that are created with this function must be freed using <a href="../../../nn/fnd/HeapBase/Destroy.html"><CODE>HeapBase::Destroy</CODE></a>.</p><p>The actual <CODE>FrameHeap</CODE> object is created within the region defined by the values specified for the <SPAN class="argument">addr</SPAN> and <SPAN class="argument">size</SPAN> arguments. This means that the actual size allocated to the heap is the size of the specified region minus <CODE>sizeof(FrameHeap)</CODE>.</p><p>Use the <SPAN class="argument">placement</SPAN> argument to specify where the <CODE>FrameHeap</CODE> object is placed. If you specify <CODE>HEAP_INFOPLACEMENT_HEAD</CODE> for <SPAN class="argument">placement</SPAN>, the actual <CODE>FrameHeap</CODE> object is placed at the start of the region (in other words, the region that starts at <SPAN class="argument">addr</SPAN> and ends at <SPAN class="argument">addr</SPAN><CODE>+sizeof(FrameHeap)</CODE>. If you specify <CODE>HEAP_INFOPLACEMENT_TAIL</CODE> for <SPAN class="argument">placement</SPAN>, the actual <CODE>FrameHeap</CODE> object is placed at the end of the region (in other words, the region that starts at <SPAN class="argument">addr</SPAN>+<SPAN class="argument">size</SPAN><CODE>-sizeof(FrameHeap)</CODE> and ends at <SPAN class="argument">addr</SPAN>+<SPAN class="argument">size</SPAN>.</p><!-- write here --></div> 64<h2>Revision History</h2> 65 <div class="section"> 66 <dl class="history"> 67 <dt>2010/01/08</dt> 68<dd>Added the <SPAN class="argument">placement</SPAN> argument, which is used to specify where to place the management region.<br /> 69 </dd> 70 <dt>2010/01/07</dt> 71<dd>Initial version.<br /> 72 </dd> 73 </dl> 74 </div> 75 <hr><p>CONFIDENTIAL</p></body> 76</html>