--- a/kernel/eka/memmodel/epoc/flexible/mmu/mmu.h Tue Feb 02 01:24:03 2010 +0200
+++ b/kernel/eka/memmodel/epoc/flexible/mmu/mmu.h Fri Apr 16 16:24:37 2010 +0300
@@ -21,8 +21,6 @@
#ifndef __MMU_H__
#define __MMU_H__
-#define _USE_OLDEST_LISTS
-
#include "mm.h"
#include "mmboot.h"
#include <mmtypes.h>
@@ -145,7 +143,7 @@
enum TPagedState
{
/**
- Page is not being managed for demand paging purposes, is has been transiently
+ Page is not being managed for demand paging purposes, or has been transiently
removed from the demand paging live list.
*/
EUnpaged = 0x0,
@@ -171,7 +169,6 @@
// NOTE - This must be the same value as EStatePagedLocked as defined in mmubase.h
EPagedPinned = 0x4,
-#ifdef _USE_OLDEST_LISTS
/**
Page is in the live list as one of oldest pages that is clean.
*/
@@ -180,8 +177,7 @@
/**
Page is in the live list as one of oldest pages that is dirty.
*/
- EPagedOldestDirty = 0x6
-#endif
+ EPagedOldestDirty = 0x6
};
@@ -677,7 +673,7 @@
/**
Flag this page as 'dirty', indicating that its contents may no longer match those saved
- to a backing store. This sets the flag #EWritable.
+ to a backing store. This sets the flag #EDirty.
This is used in the management of demand paged memory.
@@ -686,12 +682,13 @@
FORCE_INLINE void SetDirty()
{
CheckAccess("SetDirty");
+ __NK_ASSERT_DEBUG(IsWritable());
iFlags |= EDirty;
}
/**
Flag this page as 'clean', indicating that its contents now match those saved
- to a backing store. This clears the flag #EWritable.
+ to a backing store. This clears the flag #EDirty.
This is used in the management of demand paged memory.
@@ -700,6 +697,7 @@
FORCE_INLINE void SetClean()
{
CheckAccess("SetClean");
+ __NK_ASSERT_DEBUG(!IsWritable());
iFlags &= ~EDirty;
}
@@ -1750,11 +1748,12 @@
#endif
}
-private:
+public:
/** The lock */
static NFastMutex iLock;
#ifdef _DEBUG
+private:
static TUint UnlockGuardNest;
static TUint UnlockGuardFail;
#endif