Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

LowMemoryTask Class Reference
[QtBaseModule, QtDevToolsModule]

The LowMemoryTask class responds to low memory situations by closing applications. More...

    #include <LowMemoryTask>

Inherits QObject.

Public Functions

Additional Inherited Members


Detailed Description

The LowMemoryTask class responds to low memory situations by closing applications.

The LowMemoryTask provides a Qt Extended Server Task. Qt Extended Server Tasks are documented in full in the QtopiaServerApplication class documentation.

Task NameLowMemoryTask
InterfacesNone
ServicesNone

The LowMemoryTask monitors memory pressure through the default MemoryMonitor providing task. The following table describes the action taken by this task at each memory level.

The following table describes the action taken by this task at each memory level.

Memory StateAction
MemoryMonitor::MemNormalNo action.
MemoryMonitor::MemLowThe quitIfInvisible() message is sent to all the applications marked expendable or important that are in the lazy-application-shutdown state. These are applications that have ended but have been kept loaded in case they are run again. Also, the RecoverMemory() message is sent to the QPE/System channel, which can be used by running applications to trigger recovering memory and freeing caches.
MemoryMonitor::MemVeryLowA quit() message is sent to one process. If there are processes running that are marked expendable, one of these is told to quit. Otherwise, if there are processes running that are marked important, one of these is told to quit. Otherwise, no process is told to quit.
MemoryMonitor::MemCriticalA kill() signal is sent to one process. If there are processes running that are marked expendable, one of these is killed. Otherwise, if there are processes running that are marked important, one of these is killed. Otherwise, no process is killed, and if the system finally runs out of memory, Linux will kill a process according to its own rules.

Although the LowMemoryTask is notified of all memory state changes, no action is taken when the memory state improves.

This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.


Member Function Documentation

LowMemoryTask::~LowMemoryTask ()   [virtual]

Destroys the LowMemoryTask instance.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3