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>nn::fnd::ExpHeapTemplate::Adjust</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14u32 Adjust();
15<a href="../../../nn/fnd/MemoryRange/Overview.html">MemoryRange</a> Adjust(
16     <a href="../../../nn/fnd/HeapAdjustMode.html">HeapAdjustMode</a> mode
17);
18</pre>
19    </div>
20<h2>List of Overloaded Member Functions</h2>
21    <div class="section">
22      <table class="members">
23        <tr>
24          <td>
25<a href="./Adjust(0).html"><CODE>Adjust()</CODE> </a>
26          </td>
27<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>
28        </tr>
29        <tr>
30          <td>
31<a href="./Adjust(1).html"><CODE>Adjust(HeapAdjustMode)</CODE> </a>
32          </td>
33<td>Frees unused areas of the expanded heap to reduce the amount of memory the expanded heap uses.</td>
34        </tr> </table>
35    </div>
36<h2>Description of <CODE>Adjust()</CODE></h2>
37<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>
38<h2>Description of <CODE>Adjust(HeapAdjustMode)</CODE></h2>
39<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.
40We 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>
41  <hr><p>CONFIDENTIAL</p></body>
42</html>
43