--- a/sysresmonitoring/oommonitor/src/oommemorymonitorsession.cpp Thu Jul 15 18:49:38 2010 +0300
+++ b/sysresmonitoring/oommonitor/src/oommemorymonitorsession.cpp Thu Aug 19 10:05:08 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -60,6 +60,32 @@
return Server().Monitor();
#endif
}
+#ifndef CLIENT_REQUEST_QUEUE
+TBool CMemoryMonitorSession::IsDataPaged(const RMessage2& aMessage)
+ {
+ RThread clientThread;
+ TInt err = aMessage.Client(clientThread);
+ TBool dataPaged = EFalse;
+ if(err == KErrNone)
+ {
+ RProcess processName;
+ err = clientThread.Process(processName);
+ if(err == KErrNone)
+ {
+ dataPaged = processName.DefaultDataPaged();
+ }
+ else
+ {
+ PanicClient(aMessage, EPanicIllegalFunction);
+ }
+ }
+ else
+ {
+ PanicClient(aMessage, EPanicIllegalFunction);
+ }
+ return dataPaged;
+ }
+#endif
void CMemoryMonitorSession::ServiceL(const RMessage2& aMessage)
{
@@ -79,7 +105,7 @@
ClientRequestQueue().RequestFreeMemoryL(aMessage);
#else
iRequestFreeRam = aMessage;
- Monitor().RequestFreeMemoryL(aMessage.Int0());
+ Monitor().RequestFreeMemoryL(aMessage.Int0(), IsDataPaged(aMessage));
#endif
break;
@@ -103,7 +129,7 @@
#else
iRequestFreeRam = aMessage;
iMinimumMemoryRequested = aMessage.Int1();
- Monitor().FreeOptionalRamL(aMessage.Int0(), aMessage.Int2());
+ Monitor().FreeOptionalRamL(aMessage.Int0(), aMessage.Int2(), IsDataPaged(aMessage));
#endif
break;