--- a/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp Mon Mar 15 12:43:37 2010 +0200
+++ b/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp Wed Mar 31 23:03:58 2010 +0300
@@ -231,7 +231,7 @@
TRACES1("FreeMemThresholdCrossedL : crossed low threshold %d", iLowThreshold);
iMemAllocationsGrowing->Stop();
iMemAllocationsGoingDown->Continue();
- if(iTrigger == EGOomTriggerNone)
+ if((iTrigger == EGOomTriggerNone) && !NeedToPostponeMemGood() && !iSynchTimer->IsActive() )
StartFreeSomeRamL(iGoodThreshold, EGOomTriggerThresholdCrossed);
}
#endif
@@ -251,9 +251,11 @@
// Refresh the low and good memory thresholds as they may have changed due to the new foreground application
RefreshThresholds(aForegroundAppUid);
- // Not very elegant, now we poll on each window group change
- // Should have better trigger e.g. from window server
- StartFreeSomeRamL(iCurrentTarget, EGOomTriggerFocusChanged);
+
+ if(iCurrentTarget)
+ {
+ StartFreeSomeRamL(iCurrentTarget, EGOomTriggerFocusChanged);
+ }
}
void CMemoryMonitor::StartFreeSomeRamL(TInt aTargetFree, TInt aMaxPriority, TGOomTrigger aTrigger) // The maximum priority of action to run
@@ -379,8 +381,8 @@
// Calculate the desired good threshold, this could be the globally configured value...
iGoodThreshold = CMemoryMonitor::GlobalConfig().iGoodRamThreshold;
iLowThreshold = CMemoryMonitor::GlobalConfig().iLowRamThreshold;
- if(iCurrentTarget < iLowThreshold)
- iCurrentTarget = iLowThreshold;
+ //if(iCurrentTarget < iLowThreshold)
+ // iCurrentTarget = iLowThreshold;
TRACES2("CMemoryMonitor::RefreshThresholds: Global Good Threshold = %d, Global Low Threshold = %d", iGoodThreshold, iLowThreshold);