--- a/appsupport_plat/oom_monitor_plugin_api/inc/oommonitorplugin.h Tue Feb 02 10:12:00 2010 +0200
+++ b/appsupport_plat/oom_monitor_plugin_api/inc/oommonitorplugin.h Fri Feb 19 22:58:54 2010 +0200
@@ -99,6 +99,44 @@
};
+class COomMonitorPluginV2 : public COomMonitorPlugin
+ {
+public: // From COomMonitorPlugin
+ /**
+ * FreeRam is called when the system RAM level becomes
+ * low. This plugin is requested to help free some RAM.
+ *
+ * Note that OomMonitorV2 will not call this version of the function so it does not need to be implemented.
+ */
+ IMPORT_C virtual void FreeRam();
+
+ /**
+ * MemoryGood is called when the system RAM level becomes
+ * good after being low.The plugin may take this opportunity
+ * to start using RAM again.
+ * Nb It is assumed that the plugin will not immediately
+ * cause a large increase in memory use, but that memory may be
+ * used over time, otherwise the plugin may cause oscillation
+ * between low and good memory states.
+ */
+ virtual void MemoryGood() = 0;
+
+public:
+ /**
+ * FreeRam is called when the system RAM level becomes
+ * low. This plugin is requested to help free some RAM.
+ * Note that it is desirable to delete all memory associated with this plugin if
+ * not using a disconnected chunk. The reason for this is that by only releasing a small amount
+ * of the memory you reduce the chances of that memory being at the end of the chunk and therefore
+ * reduce the likelihood of it being released to the system.
+ * @param aBytesToFree The minimum number of bytes of free memory that the plugin should try to free.
+ */
+ virtual void FreeRam(TInt aBytesToFree) = 0;
+
+ };
+
+
+
/**
* CAppOomMonitorPlugin is a specialised OOM monitor plugin
* that sends messages to applications when the memory state