diff -r 3f0ddfac3ede -r f429a0a2075b mmresourcemgmt/mmresctrl/src/mmrcserver/mmrcserver.cpp --- a/mmresourcemgmt/mmresctrl/src/mmrcserver/mmrcserver.cpp Thu Jul 15 20:22:56 2010 +0300 +++ b/mmresourcemgmt/mmresctrl/src/mmrcserver/mmrcserver.cpp Thu Aug 19 11:23:35 2010 +0300 @@ -224,6 +224,17 @@ // Need to check that the server exists. if ( findCountServer.Next(name) != KErrNone ) { +#if (defined (__WINS__) || defined (__WINSCW__) ) + // Create the thread for the server. Don't allocate a separate + // heap but use client thread's heap instead. This saves memory + // space in the single process model used in the emulator. + res = aServerThread.Create(KMMRCServerName, + CMMRCServer::ThreadFunction, + KMMRCServerStackSize, + NULL, + NULL + ); +#else // Create the thread for the server. res = aServerThread.Create(KMMRCServerName, CMMRCServer::ThreadFunction, @@ -232,6 +243,7 @@ KMMRCServerMaxHeapSize, NULL ); +#endif // The thread has been created OK so get it started - however // we need to make sure that it has started before we continue.