Revision: 201033 RCL_3 PDK_3.0.3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 23:02:38 +0300
branchRCL_3
changeset 54 78e19bc09b73
parent 52 31fccae4f8a7
child 57 eaa079afe64c
Revision: 201033 Kit: 201035
uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp
--- a/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp	Wed Sep 01 12:16:53 2010 +0100
+++ b/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp	Tue Sep 14 23:02:38 2010 +0300
@@ -205,9 +205,10 @@
     FUNC_LOG;
     // keep only one notification active at a moment
 #ifdef USE_ASYNCYH_NOTIFICATIONS 
-    TInt current = GetFreeMemory();
+   
     if (aThreshold == EGL_PROF_TOTAL_MEMORY_USAGE_LT_NOK)
         {
+        TInt current = GetFreeMemory();
         if(current >= iGoodThreshold  && (!NeedToPostponeMemGood()))
             {
             TRACES2("FreeMemThresholdCrossedL : crossed good threshold Free %d, GThresh %d, Calling MemoryGood",current, iGoodThreshold);
@@ -229,20 +230,15 @@
         }
     else//if aThreshold == EGL_PROF_TOTAL_MEMORY_USAGE_GT_NOK
         {
-        if(current < iLowThreshold)
+        TRACES1("FreeMemThresholdCrossedL : crossed low threshold %d", iLowThreshold);
+        iMemAllocationsGrowing->Stop();
+        iMemAllocationsGoingDown->Continue();
+        if((iTrigger == EGOomTriggerNone) && !NeedToPostponeMemGood())
             {
-            TRACES1("FreeMemThresholdCrossedL : crossed low threshold %d", iLowThreshold);
-            iMemAllocationsGrowing->Stop();
-            iMemAllocationsGoingDown->Continue();
-            if((iTrigger == EGOomTriggerNone) && !NeedToPostponeMemGood())
-                {
-                if(iSynchTimer->IsActive())
-                    iSynchTimer->Cancel();
-                StartFreeSomeRamL(iGoodThreshold, EGOomTriggerThresholdCrossed);
-                }
+            if(iSynchTimer->IsActive())
+                iSynchTimer->Cancel();
+            StartFreeSomeRamL(iGoodThreshold, EGOomTriggerThresholdCrossed);
             }
-        else
-            TRACES2("FreeMemThresholdCrossedL : crossed low threshold %d, FALSE ALARM, FreeMem = %d", iLowThreshold, current);
         }
 #endif
     }