Symbian3/SDK/Source/GUID-217C992B-AC56-42A7-9920-DEC891D233A5.dita
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     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 task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-217C992B-AC56-42A7-9920-DEC891D233A5" xml:lang="en"><title>Allowing
       
    13 Optional RAM Allocation</title><shortdesc>This section describes how an application can request from OOM
       
    14 Monitor for optional RAM allocation.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    15 <context id="GUID-8D7EAD4C-3F9D-457C-8162-37FC14E748A6">       <p>An application
       
    16 can allocate RAM optionally by calling the <xref href="GUID-02D1911A-D2E5-3D28-9B05-75DA0A75DE73.dita#GUID-02D1911A-D2E5-3D28-9B05-75DA0A75DE73/GUID-BE322080-5193-3D8E-9425-C6BEA920ED2E"><apiname>ROomMonitorSession::RequestFreeMemory()</apiname></xref> method.
       
    17 For more information on optional RAM, refer to <xref href="GUID-7D727FC9-EF32-49FD-B72E-E1E00315206E.dita">Optional
       
    18 RAM Allocation</xref>.</p><p>An application can release the optional RAM allocation
       
    19 as soon as it is not needed anymore. An application can also keep the optional
       
    20 RAM allocation until OOM Monitor requests to release it.</p> 
       
    21    </context>
       
    22 <steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-8-1-10-1-1-8-1-5-1-6-1-7-1-3-2">
       
    23 <step id="GUID-83631E4F-71D0-4FD2-8FD6-46689AAFA761-GENID-1-8-1-10-1-1-8-1-5-1-6-1-7-1-3-2-1"><cmd>Create an OOM Monitor
       
    24 session.</cmd>
       
    25 <info><codeblock xml:space="preserve">ROomMonitorSession ioomMonitorSession;
       
    26 CleanUpClosePushL(ioomMonitorSession);
       
    27 User::LeaveIfError(ioomMonitorSession.Connect());
       
    28 </codeblock></info>
       
    29 </step>
       
    30 <step id="GUID-83631E4F-71D0-4FD2-8FD6-46689AAFA761-GENID-1-8-1-10-1-1-8-1-5-1-6-1-7-1-3-2-2"><cmd>Request for optional
       
    31 RAM.</cmd>
       
    32 <info><codeblock xml:space="preserve">iOomMonitorSession.RequestOptionalRam(aBytesRequested,aMinimumBytesNeeded,aPluginId,aBytesAvailable);
       
    33 </codeblock><p/></info>
       
    34 </step>
       
    35 <step id="GUID-5B3E8176-528F-45E7-B1CE-57ADCFAB5C6C-GENID-1-8-1-10-1-1-8-1-5-1-6-1-7-1-3-2-3"><cmd>Close the session.</cmd>
       
    36 <info><codeblock xml:space="preserve">iOomMonitorSession.Close();
       
    37 </codeblock></info>
       
    38 </step>
       
    39 </steps>
       
    40 </taskbody><related-links>
       
    41 <link href="GUID-DB6F586B-932A-4BDC-BA48-79C7D3FD9931.dita"><linktext>OOM Monitor
       
    42 Plug-in</linktext></link>
       
    43 <link href="GUID-39A8FBC9-5FD6-4F92-B71E-5C5438ECFD46.dita"><linktext>OOM Monitor
       
    44 Overview</linktext></link>
       
    45 <link href="GUID-88752800-83BD-4845-80A0-6B65D8D81924.dita"><linktext>OOM Monitor
       
    46 Reference</linktext></link>
       
    47 </related-links></task>