kernel/eka/memmodel/epoc/flexible/mmu/x86/xmmu.cpp
changeset 121 661475905584
parent 36 538db54a451d
child 257 3e88ff8f41d5
child 279 957c583b417b
--- a/kernel/eka/memmodel/epoc/flexible/mmu/x86/xmmu.cpp	Fri Apr 23 22:02:01 2010 +0100
+++ b/kernel/eka/memmodel/epoc/flexible/mmu/x86/xmmu.cpp	Fri Apr 23 22:08:41 2010 +0100
@@ -546,6 +546,15 @@
 	if(TUint(aAddr^KIPCAlias)<TUint(KIPCAliasAreaSize))
 		return KErrBadDescriptor; // prevent access to alias region
 
+#ifdef _DEBUG
+	if (KDebugNum(KFORCEKUPAGEFAULTS))
+		{
+		TInt r = ThePager.FlushRegion(aProcess, aAddr, aSize);
+		if (r != KErrNone)
+			return r;
+		}
+#endif
+	
 	// Grab the mmu lock before opening a reference on os asid so that this thread 
 	// is in an implicit critical section and therefore can't leak the reference by
 	// dying before iAliasLinAddr is set.