uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp
branchRCL_3
changeset 11 46927d61fef3
parent 10 88b23e2e82e1
child 17 3ac8bf5c5014
--- a/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp	Wed Mar 31 23:03:58 2010 +0300
+++ b/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp	Wed Apr 14 16:53:50 2010 +0300
@@ -277,13 +277,13 @@
 
     if (freeMemoryAboveCurrentTarget)
         {
-        ResetTargets();
         /*if(freeMemory >= iGoodThreshold && !NeedToPostponeMemGood())
             {
                 iGOomActionList->MemoryGood();
             }
         */
         iServer->CloseAppsFinished(freeMemory, ETrue);
+        WaitAndSynchroniseMemoryState();
         return;
         }
 
@@ -386,6 +386,7 @@
         
     TRACES2("CMemoryMonitor::RefreshThresholds: Global Good Threshold = %d, Global Low Threshold = %d", iGoodThreshold, iLowThreshold);
 
+    TBool useSwRendering = EFalse;
     // The global value can be overridden by an app specific value
     // Find the application config entry for the foreground application
     if (aForegroundAppUid == KErrNotFound)
@@ -414,7 +415,15 @@
         TRACES2("CMemoryMonitor::RefreshThresholds: For foreground app %x, Target Free on Startup = %d", aForegroundAppUid, iCurrentTarget);
         }
     
+
+    if (iConfig->GetApplicationConfig(aForegroundAppUid).iUseSwRendering != KGOomThresholdUnset)
+        {
+        useSwRendering = iConfig->GetApplicationConfig(aForegroundAppUid).iUseSwRendering;
+        TRACES2("CMemoryMonitor::RefreshThresholds: For foreground app %x, UseSwRendering = %d", aForegroundAppUid, useSwRendering);
+        }
+    
     iGOomActionList->SetCurrentTarget(iCurrentTarget);
+    iGOomActionList->SetUseSwRendering(useSwRendering);
     
 #ifdef USE_ASYNCYH_NOTIFICATIONS 
 
@@ -594,7 +603,17 @@
                 break;
                 }
             case EGL_PROF_PROCESS_USED_PRIVATE_MEMORY_NOK:
+                    {
+                    TUint mem = prof_data[i];
+                    TRACES1("Private memory Usage by app is %d", mem);
+                    break;
+                    }
             case EGL_PROF_PROCESS_USED_SHARED_MEMORY_NOK:
+                    {
+                    TUint mem = prof_data[i];
+                    TRACES1("Shared memory Usage by app is %d", mem);
+                    break;
+                    }
 			default:
 				{
                 i++;