diff -r 73ea206103e6 -r 43365a9b78a3 kernel/eka/memmodel/epoc/mmubase/defragbase.cpp --- a/kernel/eka/memmodel/epoc/mmubase/defragbase.cpp Wed Jun 23 19:44:53 2010 +0300 +++ b/kernel/eka/memmodel/epoc/mmubase/defragbase.cpp Tue Jul 06 15:50:07 2010 +0300 @@ -78,6 +78,7 @@ TUint offset = 0; TPhysAddr newAddr; TBool zoneActive = EFalse; + const TUint moveDisFlags = (aBestEffort)? 0 : M::EMoveDisBlockRest | M::EMoveDisMoveDirty; TInt ret = iRamAllocator->NextAllocatedPage(&aZone, offset, EPageMovable); // if not best effort mode keep moving pages unless someone allocates into @@ -101,7 +102,7 @@ __KTRACE_OPT(KMMU, Kern::Printf("ClearMovableFromZone: memory too low or zone active addr %x", addr)); return KErrNoMemory; } - TInt moved = M::MovePage(addr, newAddr, aZone.iId, !aBestEffort); + TInt moved = M::MovePage(addr, newAddr, aZone.iId, moveDisFlags); if (moved != KErrNone) {// Couldn't move the page so stop as we can't clear the zone if (!aBestEffort) @@ -144,6 +145,7 @@ TUint offset = 0; TBool zoneActive = EFalse; TInt ret = iRamAllocator->NextAllocatedPage(&aZone, offset, EPageDiscard); + const TUint moveDisFlags = (aBestEffort)? 0 : M::EMoveDisBlockRest | M::EMoveDisMoveDirty; while ( aZone.iAllocPages[EPageDiscard] != 0 && ret == KErrNone && @@ -169,7 +171,7 @@ return KErrNoMemory; } - TInt discardRet = M::DiscardPage(addr, aZone.iId, !aBestEffort); + TInt discardRet = M::DiscardPage(addr, aZone.iId, moveDisFlags); if (discardRet == KErrNone) {// Page was discarded successfully. if (aMaxDiscard)