diff -r 73ff0d268e1d -r ecff51f1e7fb stif/TestModuleTemplates/STIFUnitXXX/src/STIFUnitXXX.cpp --- 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 /* + * 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.