equal
deleted
inserted
replaced
275 |
275 |
276 TRACES2("MemoryMonitor::StartFreeSomeRamL freeMemoryAboveTarget = %d, freeMemory = %d", freeMemoryAboveCurrentTarget, freeMemory); |
276 TRACES2("MemoryMonitor::StartFreeSomeRamL freeMemoryAboveTarget = %d, freeMemory = %d", freeMemoryAboveCurrentTarget, freeMemory); |
277 |
277 |
278 if (freeMemoryAboveCurrentTarget) |
278 if (freeMemoryAboveCurrentTarget) |
279 { |
279 { |
280 ResetTargets(); |
|
281 /*if(freeMemory >= iGoodThreshold && !NeedToPostponeMemGood()) |
280 /*if(freeMemory >= iGoodThreshold && !NeedToPostponeMemGood()) |
282 { |
281 { |
283 iGOomActionList->MemoryGood(); |
282 iGOomActionList->MemoryGood(); |
284 } |
283 } |
285 */ |
284 */ |
286 iServer->CloseAppsFinished(freeMemory, ETrue); |
285 iServer->CloseAppsFinished(freeMemory, ETrue); |
|
286 WaitAndSynchroniseMemoryState(); |
287 return; |
287 return; |
288 } |
288 } |
289 |
289 |
290 // update wg list only when actually about to use it |
290 // update wg list only when actually about to use it |
291 //iGOomWindowGroupList->Refresh(); |
291 //iGOomWindowGroupList->Refresh(); |
384 //if(iCurrentTarget < iLowThreshold) |
384 //if(iCurrentTarget < iLowThreshold) |
385 // iCurrentTarget = iLowThreshold; |
385 // iCurrentTarget = iLowThreshold; |
386 |
386 |
387 TRACES2("CMemoryMonitor::RefreshThresholds: Global Good Threshold = %d, Global Low Threshold = %d", iGoodThreshold, iLowThreshold); |
387 TRACES2("CMemoryMonitor::RefreshThresholds: Global Good Threshold = %d, Global Low Threshold = %d", iGoodThreshold, iLowThreshold); |
388 |
388 |
|
389 TBool useSwRendering = EFalse; |
389 // The global value can be overridden by an app specific value |
390 // The global value can be overridden by an app specific value |
390 // Find the application config entry for the foreground application |
391 // Find the application config entry for the foreground application |
391 if (aForegroundAppUid == KErrNotFound) |
392 if (aForegroundAppUid == KErrNotFound) |
392 { |
393 { |
393 return; |
394 return; |
412 { |
413 { |
413 iCurrentTarget = iConfig->GetApplicationConfig(aForegroundAppUid).iTargetFree; |
414 iCurrentTarget = iConfig->GetApplicationConfig(aForegroundAppUid).iTargetFree; |
414 TRACES2("CMemoryMonitor::RefreshThresholds: For foreground app %x, Target Free on Startup = %d", aForegroundAppUid, iCurrentTarget); |
415 TRACES2("CMemoryMonitor::RefreshThresholds: For foreground app %x, Target Free on Startup = %d", aForegroundAppUid, iCurrentTarget); |
415 } |
416 } |
416 |
417 |
|
418 |
|
419 if (iConfig->GetApplicationConfig(aForegroundAppUid).iUseSwRendering != KGOomThresholdUnset) |
|
420 { |
|
421 useSwRendering = iConfig->GetApplicationConfig(aForegroundAppUid).iUseSwRendering; |
|
422 TRACES2("CMemoryMonitor::RefreshThresholds: For foreground app %x, UseSwRendering = %d", aForegroundAppUid, useSwRendering); |
|
423 } |
|
424 |
417 iGOomActionList->SetCurrentTarget(iCurrentTarget); |
425 iGOomActionList->SetCurrentTarget(iCurrentTarget); |
|
426 iGOomActionList->SetUseSwRendering(useSwRendering); |
418 |
427 |
419 #ifdef USE_ASYNCYH_NOTIFICATIONS |
428 #ifdef USE_ASYNCYH_NOTIFICATIONS |
420 |
429 |
421 // if allocation should fail, threshold should not naturally be set |
430 // if allocation should fail, threshold should not naturally be set |
422 if (!iMemAllocationsGrowing) |
431 if (!iMemAllocationsGrowing) |
592 i++; |
601 i++; |
593 } |
602 } |
594 break; |
603 break; |
595 } |
604 } |
596 case EGL_PROF_PROCESS_USED_PRIVATE_MEMORY_NOK: |
605 case EGL_PROF_PROCESS_USED_PRIVATE_MEMORY_NOK: |
|
606 { |
|
607 TUint mem = prof_data[i]; |
|
608 TRACES1("Private memory Usage by app is %d", mem); |
|
609 break; |
|
610 } |
597 case EGL_PROF_PROCESS_USED_SHARED_MEMORY_NOK: |
611 case EGL_PROF_PROCESS_USED_SHARED_MEMORY_NOK: |
|
612 { |
|
613 TUint mem = prof_data[i]; |
|
614 TRACES1("Shared memory Usage by app is %d", mem); |
|
615 break; |
|
616 } |
598 default: |
617 default: |
599 { |
618 { |
600 i++; |
619 i++; |
601 break; |
620 break; |
602 } |
621 } |