First public contribution.
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
13 // Description: mdefrag.inl
14 // In line utility functions used by the defragbase.cpp and ramalloc.cpp
26 inline TInt M::PageShift()
32 inline void M::RamAllocLock()
38 inline void M::RamAllocUnlock()
40 RamAllocLock::Unlock();
44 inline void M::RamAllocIsLocked()
48 __NK_ASSERT_DEBUG(RamAllocLock::IsHeld());
53 inline TInt M::DiscardPage(TPhysAddr aAddr, TUint aBlockZoneId, TBool aBlockRest)
56 return MovePage(aAddr, newAddr, aBlockZoneId, aBlockRest);
60 inline TUint M::NumberOfFreeDpPages()
62 return ThePager.NumberOfFreePages();
66 inline TUint M::NumberOfDirtyDpPages()
68 return ThePager.NumberOfDirtyPages();
72 inline void M::RamZoneClaimed(SZone* aZone)
74 TheMmu.AllocatedPhysicalRam(aZone->iPhysBase,
76 (Mmu::TRamAllocFlags)EMemAttStronglyOrdered);