169 Page has been removed from live list to prevent contents being paged-out. |
167 Page has been removed from live list to prevent contents being paged-out. |
170 */ |
168 */ |
171 // NOTE - This must be the same value as EStatePagedLocked as defined in mmubase.h |
169 // NOTE - This must be the same value as EStatePagedLocked as defined in mmubase.h |
172 EPagedPinned = 0x4, |
170 EPagedPinned = 0x4, |
173 |
171 |
174 #ifdef _USE_OLDEST_LISTS |
|
175 /** |
172 /** |
176 Page is in the live list as one of oldest pages that is clean. |
173 Page is in the live list as one of oldest pages that is clean. |
177 */ |
174 */ |
178 EPagedOldestClean = 0x5, |
175 EPagedOldestClean = 0x5, |
179 |
176 |
180 /** |
177 /** |
181 Page is in the live list as one of oldest pages that is dirty. |
178 Page is in the live list as one of oldest pages that is dirty. |
182 */ |
179 */ |
183 EPagedOldestDirty = 0x6 |
180 EPagedOldestDirty = 0x6 |
184 #endif |
|
185 }; |
181 }; |
186 |
182 |
187 |
183 |
188 /** |
184 /** |
189 Additional flags, stored in #iFlags2. |
185 Additional flags, stored in #iFlags2. |
675 return iFlags&EWritable; |
671 return iFlags&EWritable; |
676 } |
672 } |
677 |
673 |
678 /** |
674 /** |
679 Flag this page as 'dirty', indicating that its contents may no longer match those saved |
675 Flag this page as 'dirty', indicating that its contents may no longer match those saved |
680 to a backing store. This sets the flag #EWritable. |
676 to a backing store. This sets the flag #EDirty. |
681 |
677 |
682 This is used in the management of demand paged memory. |
678 This is used in the management of demand paged memory. |
683 |
679 |
684 @pre #MmuLock held. |
680 @pre #MmuLock held. |
685 */ |
681 */ |
686 FORCE_INLINE void SetDirty() |
682 FORCE_INLINE void SetDirty() |
687 { |
683 { |
688 CheckAccess("SetDirty"); |
684 CheckAccess("SetDirty"); |
|
685 __NK_ASSERT_DEBUG(IsWritable()); |
689 iFlags |= EDirty; |
686 iFlags |= EDirty; |
690 } |
687 } |
691 |
688 |
692 /** |
689 /** |
693 Flag this page as 'clean', indicating that its contents now match those saved |
690 Flag this page as 'clean', indicating that its contents now match those saved |
694 to a backing store. This clears the flag #EWritable. |
691 to a backing store. This clears the flag #EDirty. |
695 |
692 |
696 This is used in the management of demand paged memory. |
693 This is used in the management of demand paged memory. |
697 |
694 |
698 @pre #MmuLock held. |
695 @pre #MmuLock held. |
699 */ |
696 */ |
700 FORCE_INLINE void SetClean() |
697 FORCE_INLINE void SetClean() |
701 { |
698 { |
702 CheckAccess("SetClean"); |
699 CheckAccess("SetClean"); |
|
700 __NK_ASSERT_DEBUG(!IsWritable()); |
703 iFlags &= ~EDirty; |
701 iFlags &= ~EDirty; |
704 } |
702 } |
705 |
703 |
706 /** |
704 /** |
707 Return the #EDirty flag. See #SetDirty and #SetClean. |
705 Return the #EDirty flag. See #SetDirty and #SetClean. |