--- a/kerneltest/e32test/demandpaging/t_thrash.cpp Wed Dec 23 11:43:31 2009 +0000
+++ b/kerneltest/e32test/demandpaging/t_thrash.cpp Thu Jan 07 13:38:45 2010 +0200
@@ -405,6 +405,20 @@
test_KErrNone(GetGlobalPolicies());
+ TUint cacheOriginalMin = 0;
+ TUint cacheOriginalMax = 0;
+ TUint cacheCurrentSize = 0;
+
+ if (gDataPagingSupported)
+ {
+ test.Next(_L("Thrash test: change maximum cache size to minimal"));
+ //store original values
+ DPTest::CacheSize(cacheOriginalMin, cacheOriginalMax, cacheCurrentSize);
+ gMaxCacheSize = 256;
+ gMinCacheSize = 64;
+ test_KErrNone(DPTest::SetCacheSize(gMinCacheSize * gPageSize, gMaxCacheSize * gPageSize));
+ }
+
TBool flexibleMemoryModel = (MemModelAttributes() & EMemModelTypeMask) == EMemModelTypeFlexible;
if (flexibleMemoryModel)
TestThrashHal();
@@ -416,6 +430,12 @@
test.Next(_L("Extended thrashing tests"));
TestThrashing();
}
+ if (gDataPagingSupported)
+ {
+ //Reset the cache size to normal
+ test.Next(_L("Thrash test: Reset cache size to normal"));
+ test_KErrNone(DPTest::SetCacheSize(cacheOriginalMin, cacheOriginalMax));
+ }
test.End();
return 0;