stif/TestModuleTemplates/STIFUnitXXX/src/STIFUnitXXX.cpp
branchRCL_3
changeset 6 ecff51f1e7fb
parent 0 a03f92240627
child 18 3406c99bc375
--- a/stif/TestModuleTemplates/STIFUnitXXX/src/STIFUnitXXX.cpp	Sat Feb 20 00:22:34 2010 +0200
+++ b/stif/TestModuleTemplates/STIFUnitXXX/src/STIFUnitXXX.cpp	Fri Mar 12 15:50:45 2010 +0200
@@ -33,6 +33,8 @@
 //#define STIFUNIT_OOMTESTINITIALIZEL
 //#define STIFUNIT_OOMHANDLEWARNINGL
 //#define STIFUNIT_OOMTESTFINALIZEL
+// Uncomment following define, if you want to increase heap or stack size.
+// #define STIFUNIT_SETHEAPANDSTACKSIZE
 /******************************************************************************/
 
 
@@ -57,6 +59,28 @@
 #include <StifUnitGeneric.h>
 
 /*
+ * Implementation of setHeapAndStack virtual methods.
+ * To changes heap and stack size provide new values to iTestThreadStackSize, iTestThreadMinHeap and iTestThreadMaxHeap. 
+*/
+
+#ifdef STIFUNIT_SETHEAPANDSTACKSIZE
+EXPORT_C TInt SetRequirements( CTestModuleParam*& aTestModuleParam, 
+                               TUint32& aParameterValid )
+    {
+    aParameterValid = KStifTestModuleParameterChanged;
+    CTestModuleParamVer01* param = CTestModuleParamVer01::NewL(); 
+    // Stack size 
+    param->iTestThreadStackSize= 16384; // 16K stack 
+    // Heap sizes 
+    param->iTestThreadMinHeap = 4096; // 4K heap min 
+    param->iTestThreadMaxHeap = 1048576;// 1M heap max 
+
+    return KErrNone;
+    }
+#undef STIFUNIT_SETHEAPANDSTACKSIZE
+#endif
+
+/*
  * User implementation of OOM virtual methods.
  * Providing own implementation requires uncommenting defines at the
  * beginnig of this file.