170 Page has been removed from live list to prevent contents being paged-out. |
168 Page has been removed from live list to prevent contents being paged-out. |
171 */ |
169 */ |
172 // NOTE - This must be the same value as EStatePagedLocked as defined in mmubase.h |
170 // NOTE - This must be the same value as EStatePagedLocked as defined in mmubase.h |
173 EPagedPinned = 0x4, |
171 EPagedPinned = 0x4, |
174 |
172 |
175 #ifdef _USE_OLDEST_LISTS |
|
176 /** |
173 /** |
177 Page is in the live list as one of oldest pages that is clean. |
174 Page is in the live list as one of oldest pages that is clean. |
178 */ |
175 */ |
179 EPagedOldestClean = 0x5, |
176 EPagedOldestClean = 0x5, |
180 |
177 |
181 /** |
178 /** |
182 Page is in the live list as one of oldest pages that is dirty. |
179 Page is in the live list as one of oldest pages that is dirty. |
183 */ |
180 */ |
184 EPagedOldestDirty = 0x6 |
181 EPagedOldestDirty = 0x6 |
185 #endif |
|
186 }; |
182 }; |
187 |
183 |
188 |
184 |
189 /** |
185 /** |
190 Additional flags, stored in #iFlags2. |
186 Additional flags, stored in #iFlags2. |
676 return iFlags&EWritable; |
672 return iFlags&EWritable; |
677 } |
673 } |
678 |
674 |
679 /** |
675 /** |
680 Flag this page as 'dirty', indicating that its contents may no longer match those saved |
676 Flag this page as 'dirty', indicating that its contents may no longer match those saved |
681 to a backing store. This sets the flag #EWritable. |
677 to a backing store. This sets the flag #EDirty. |
682 |
678 |
683 This is used in the management of demand paged memory. |
679 This is used in the management of demand paged memory. |
684 |
680 |
685 @pre #MmuLock held. |
681 @pre #MmuLock held. |
686 */ |
682 */ |
687 FORCE_INLINE void SetDirty() |
683 FORCE_INLINE void SetDirty() |
688 { |
684 { |
689 CheckAccess("SetDirty"); |
685 CheckAccess("SetDirty"); |
|
686 __NK_ASSERT_DEBUG(IsWritable()); |
690 iFlags |= EDirty; |
687 iFlags |= EDirty; |
691 } |
688 } |
692 |
689 |
693 /** |
690 /** |
694 Flag this page as 'clean', indicating that its contents now match those saved |
691 Flag this page as 'clean', indicating that its contents now match those saved |
695 to a backing store. This clears the flag #EWritable. |
692 to a backing store. This clears the flag #EDirty. |
696 |
693 |
697 This is used in the management of demand paged memory. |
694 This is used in the management of demand paged memory. |
698 |
695 |
699 @pre #MmuLock held. |
696 @pre #MmuLock held. |
700 */ |
697 */ |
701 FORCE_INLINE void SetClean() |
698 FORCE_INLINE void SetClean() |
702 { |
699 { |
703 CheckAccess("SetClean"); |
700 CheckAccess("SetClean"); |
|
701 __NK_ASSERT_DEBUG(!IsWritable()); |
704 iFlags &= ~EDirty; |
702 iFlags &= ~EDirty; |
705 } |
703 } |
706 |
704 |
707 /** |
705 /** |
708 Return the #EDirty flag. See #SetDirty and #SetClean. |
706 Return the #EDirty flag. See #SetDirty and #SetClean. |
1961 TUint FreeRamInPages(); |
1960 TUint FreeRamInPages(); |
1962 TUint TotalPhysicalRamPages(); |
1961 TUint TotalPhysicalRamPages(); |
1963 |
1962 |
1964 TInt AllocRam( TPhysAddr* aPages, TUint aCount, TRamAllocFlags aFlags, TZonePageType aZonePageType, |
1963 TInt AllocRam( TPhysAddr* aPages, TUint aCount, TRamAllocFlags aFlags, TZonePageType aZonePageType, |
1965 TUint aBlockZoneId=KRamZoneInvalidId, TBool aBlockRest=EFalse); |
1964 TUint aBlockZoneId=KRamZoneInvalidId, TBool aBlockRest=EFalse); |
|
1965 void MarkPageAllocated(TPhysAddr aPhysAddr, TZonePageType aZonePageType); |
1966 void FreeRam(TPhysAddr* aPages, TUint aCount, TZonePageType aZonePageType); |
1966 void FreeRam(TPhysAddr* aPages, TUint aCount, TZonePageType aZonePageType); |
1967 TInt AllocContiguousRam(TPhysAddr& aPhysAddr, TUint aCount, TUint aAlign, TRamAllocFlags aFlags); |
1967 TInt AllocContiguousRam(TPhysAddr& aPhysAddr, TUint aCount, TUint aAlign, TRamAllocFlags aFlags); |
1968 void FreeContiguousRam(TPhysAddr aPhysAddr, TUint aCount); |
1968 void FreeContiguousRam(TPhysAddr aPhysAddr, TUint aCount); |
1969 |
1969 |
1970 const SRamZone* RamZoneConfig(TRamZoneCallback& aCallback) const; |
1970 const SRamZone* RamZoneConfig(TRamZoneCallback& aCallback) const; |