Symbian3/SDK/Source/GUID-C4C8395E-F982-4D6A-88D3-28EDC494817F.dita
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
    16 described in <xref href="GUID-50CA5439-29A1-426C-83BA-EC048FE86CDE.dita">Allowing
    16 described in <xref href="GUID-50CA5439-29A1-426C-83BA-EC048FE86CDE.dita">Allowing
    17 Large Memory Allocation</xref>.</p></prereq>
    17 Large Memory Allocation</xref>.</p></prereq>
    18 <context id="GUID-D36C0590-A436-458B-B7A6-F2E8577E26C6">       <p>Requesting
    18 <context id="GUID-D36C0590-A436-458B-B7A6-F2E8577E26C6">       <p>Requesting
    19 free RAM asynchronously is recommended as the application is not blocked during
    19 free RAM asynchronously is recommended as the application is not blocked during
    20 the method call handling.</p>     </context>
    20 the method call handling.</p>     </context>
    21 <steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-8-1-10-1-1-8-1-5-1-6-1-6-1-5-1-3-3">
    21 <steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-10-1-10-1-1-8-1-5-1-6-1-6-1-5-1-3-3">
    22 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-8-1-10-1-1-8-1-5-1-6-1-6-1-5-1-3-3-1"><cmd>Start an asynchronous
    22 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-10-1-10-1-1-8-1-5-1-6-1-6-1-5-1-3-3-1"><cmd>Start an asynchronous
    23 request for a block of memory.</cmd>
    23 request for a block of memory.</cmd>
    24 <info><codeblock xml:space="preserve">CMemoryAllocatingObject::StartFunctionalityRequiringAllocationL()
    24 <info><codeblock xml:space="preserve">CMemoryAllocatingObject::StartFunctionalityRequiringAllocationL()
    25     {
    25     {
    26     User::LeaveIfError(iOomMonitorSession.Connect());
    26     User::LeaveIfError(iOomMonitorSession.Connect());
    27     iMemoryRequester = CMemoryRequester::NewL(iOomMonitorSession, *this);
    27     iMemoryRequester = CMemoryRequester::NewL(iOomMonitorSession, *this);
    28     iMemoryRequester-&gt;Start(KLargeValueToAllocate);
    28     iMemoryRequester-&gt;Start(KLargeValueToAllocate);
    29     }
    29     }
    30 </codeblock></info>
    30 </codeblock></info>
    31 </step>
    31 </step>
    32 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-8-1-10-1-1-8-1-5-1-6-1-6-1-5-1-3-3-2"><cmd>Implement the active
    32 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-10-1-10-1-1-8-1-5-1-6-1-6-1-5-1-3-3-2"><cmd>Implement the active
    33 object and request for free memory.</cmd>
    33 object and request for free memory.</cmd>
    34 <info><codeblock xml:space="preserve">void CMemoryRequester::Start(TInt aBytesRequested)
    34 <info><codeblock xml:space="preserve">void CMemoryRequester::Start(TInt aBytesRequested)
    35     {
    35     {
    36     iOomMonitorSession.RequestFreeMemory(aBytesRequested, iStatus);    
    36     iOomMonitorSession.RequestFreeMemory(aBytesRequested, iStatus);    
    37     SetActive();
    37     SetActive();