kernel/eka/memmodel/epoc/flexible/mmu/mrom.cpp
branchRCL_3
changeset 41 0ffb4e86fcc9
parent 28 5b5d147c7838
child 42 a179b74831c9
--- a/kernel/eka/memmodel/epoc/flexible/mmu/mrom.cpp	Mon Jun 21 17:12:14 2010 +0300
+++ b/kernel/eka/memmodel/epoc/flexible/mmu/mrom.cpp	Thu Jul 15 20:11:42 2010 +0300
@@ -956,7 +956,11 @@
 	RamAllocLock::Lock();
 
 	Mmu& m = TheMmu;
-	r = m.AllocRam(&iNewPage, 1, aMemory->RamAllocFlags(), EPageFixed);
+	// Allocate a page to shadow to allowing the allocation to steal pages from the paging cache.
+	r = m.AllocRam(	&iNewPage, 
+					1, 
+					(Mmu::TRamAllocFlags)(aMemory->RamAllocFlags() & ~Mmu::EAllocNoPagerReclaim), 
+					EPageFixed);
 	if(r==KErrNone)
 		{
 		TLinAddr dst = m.MapTemp(iNewPage,aIndex,0);