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>SetupHeapForMemoryBlock</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../nn/Overview.html">nn</a>::<a href="../../nn/os/Overview.html">os</a>::SetupHeapForMemoryBlock</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition">#include <nn/os.h> 14 15void SetupHeapForMemoryBlock( 16 size_t heapSize 17); 18</pre> 19 </div> 20<h2>Parameters</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>heapSize</th> 33<td>Specifies the size of the heap.</td> 34 </tr> </table> 35 </div> 36<h2>Return Values</h2> 37 <div class="section"> 38None. 39 </div> 40<h2>Description</h2> 41 <div class="section"> 42<p>This function sets up the OS to emulate the same memory environment that was used in CTR-SDK 0.9 and prior versions.</p><p> 43Calling this function sets up a memory environment with the following characteristics: 44</p><ul><li>Sets the heap size in <SPAN class="argument">heapSize</SPAN>.</li><li>This enables use of the <CODE><a href="../../nn/os/MemoryBlock/Overview.html">MemoryBlock</a></CODE> class.</li><li>The entire heap region is configured for the <CODE><a href="../../nn/os/MemoryBlock/Overview.html">MemoryBlock</a></CODE> class.</li><li>The <CODE><a href="../../nn/os/MemoryBlock/Overview.html">MemoryBlock</a></CODE> class is used to set <CODE><a href="../../nn/os/AutoStackManager/Overview.html">AutoStackManager</a></CODE> for allocating the stack.</li></ul><p> 45If you use this function, then you must not use the following functions. Doing so could produce inconsistencies that prevent normal operations. 46</p><ul><li><a href="../../nn/os/SetHeapSize.html"><CODE>nn::os::SetHeapSize</CODE></a></li><li><a href="../../nn/os/InitializeMemoryBlock.html"><CODE>nn::os::InitializeMemoryBlock</CODE></a></li></ul><p> 47In addition, you must not directly access heap regions. Be sure to access only those regions that have been allocated using the <CODE><a href="../../nn/os/MemoryBlock/Overview.html">MemoryBlock</a></CODE> class. 48 </p></div> 49<h2>Revision History</h2> 50 <div class="section"> 51 <dl class="history"> 52 <dt>2011/12/12</dt> 53<dd>Revised text that failed to reflect the changed specifications.<br /> 54 </dd> 55 <dt>2010/06/14</dt> 56<dd>Initial version.<br /> 57 </dd> 58 </dl> 59 </div> 60 <hr><p>CONFIDENTIAL</p></body> 61</html> 62