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>Adjust</title>
8  </head>
9  <body>
10<h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/fnd/Overview.html">fnd</a>::<a href="../../../nn/fnd/ExpHeapTemplate/Overview.html">ExpHeapTemplate</a>::Adjust</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14<a href="../../../nn_types/u32.html">u32</a> Adjust();
15
16<a href="../../../nn/fnd/MemoryRange/Overview.html">MemoryRange</a> Adjust(
17     <a href="../../../nn/fnd/HeapAdjustMode.html">HeapAdjustMode</a> mode
18);
19</pre>
20    </div>
21<h2>List of Overloaded Member Functions</h2>
22    <div class="section">
23      <table class="members">
24        <tr>
25          <td>
26<a href="./Adjust(0).html"><CODE>Adjust()</CODE> </a>
27          </td>
28<td>Use of this function is NOT recommended. This function frees unused areas at the tail of the expanded heap to reduce the amount of memory the expanded heap uses.</td>
29        </tr>
30        <tr>
31          <td>
32<a href="./Adjust(1).html"><CODE>Adjust(HeapAdjustMode)</CODE> </a>
33          </td>
34<td>Frees unused areas of the expanded heap to reduce the amount of memory the expanded heap uses.</td>
35        </tr> </table>
36    </div>
37<h2>Description of <CODE>Adjust()</CODE></h2>
38<div class="section"><p>This function's return value cannot be used to determine the result of the operation. A value of zero can indicate two different situations: (1) that adjustment failed, or (2) that adjustment reduced the heap size to zero because no part of the heap was allocated.</p>This function is retained for compatibility. Use the <a href="../../../nn/fnd/ExpHeapTemplate/Adjust(1).html"><CODE>Adjust(mode)</CODE></a> function instead. That version of the function allows you to specify the direction of adjustment, and returns the range of memory that was freed up as an <a href="../../../nn/fnd/MemoryRange/Overview.html"><CODE>nn::fnd::MemoryRange</CODE></a> object.</div>
39<h2>Description of <CODE>Adjust(HeapAdjustMode)</CODE></h2>
40<div class="section">This function has different return values than the version of the <a href="../../../nn/fnd/ExpHeapTemplate/Adjust(0).html"><CODE>Adjust</CODE></a> function that takes no arguments. This function returns an <a href="../../../nn/fnd/MemoryRange/Overview.html"><CODE>nn::fnd::MemoryRange</CODE></a> object as its return value. This <a href="../../../nn/fnd/MemoryRange/Overview.html"><CODE>nn::fnd::MemoryRange</CODE></a> object can be used to create a new heap in the freed memory region.
41We do not recommend using the version of the <a href="../../../nn/fnd/ExpHeapTemplate/Adjust(0).html"><CODE>Adjust</CODE></a> function that takes no arguments. When using the <CODE>Adjust</CODE> function, use the version documented on this page.</div>
42  <hr><p>CONFIDENTIAL</p></body>
43</html>
44