|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-95840076-79F2-524B-BAF7-828260BDD923" xml:lang="en"><title>Patchable |
|
13 Constants: KHeapShrinkHysRatio</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <codeblock id="GUID-5053B8C4-B730-5341-98A3-801409460573" xml:space="preserve">EXPORT_C extern const TInt KHeapShrinkHysRatio;</codeblock> |
|
15 <table id="GUID-EA923219-CBC1-5F40-9EF3-30EE85C02F76"> |
|
16 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/> |
|
17 <tbody> |
|
18 <row> |
|
19 <entry><p>Exported from: </p> </entry> |
|
20 <entry><p> <filepath>EUSER.DLL</filepath>, <filepath>EKERN.EXE</filepath> </p> </entry> |
|
21 </row> |
|
22 <row> |
|
23 <entry><p>Defined in: </p> </entry> |
|
24 <entry><p> <filepath> .../os/kernelhwsrv/kernel/eka/common/heap.cpp</filepath> </p> </entry> |
|
25 </row> |
|
26 <row> |
|
27 <entry><p>Purpose: </p> </entry> |
|
28 <entry><p>This constant defines the ratio that determines the amount of hysteresis |
|
29 between heap growing and heap shrinking. It is a 32-bit fixed point number |
|
30 where the radix point is defined to be between bits 7 and 8 (where the LSB |
|
31 is bit 0) i.e. using standard notation, a Q8 or a fx24.8 fixed point number. |
|
32 For example for a ratio of 2.0 set <codeph>KHeapShrinkHysRatio=0x200</codeph>. </p> <p>The |
|
33 heap shrinking hysteresis value is calculated to be: </p> <codeblock id="GUID-1144F94A-6B4C-582D-B1FA-E5852F6BFAA6" xml:space="preserve">KHeapShrinkHysRatio*(iGrowBy>>8)</codeblock> <p>where <codeph>iGrowBy</codeph> is a page aligned value set by the argument, <codeph>aGrowBy</codeph>, |
|
34 to the <xref href="GUID-EFAFDD75-7E59-306A-882D-317F5564979E.dita"><apiname>RHeap</apiname></xref> constructor. Default hysteresis value is <codeph>iGrowBy</codeph> bytes |
|
35 i.e. <codeph>KHeapShrinkHysRatio=2.0</codeph>. Memory usage may be improved |
|
36 by reducing the heap shrinking hysteresis by setting 1.0 < <codeph>KHeapShrinkHysRatio</codeph> < |
|
37 2.0. Heap shrinking hysteresis is disabled/removed when <codeph>KHeapShrinkHysRatio</codeph> <= |
|
38 1.0. </p> </entry> |
|
39 </row> |
|
40 </tbody> |
|
41 </tgroup> |
|
42 </table></conbody></concept> |