Home · All Classes · Grouped Classes · Annotated · Functions

LowMemoryTask Class Reference

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

    #include <LowMemoryTask>

Inherits QObject.

Public Functions

Signals

Additional Inherited Members


Detailed Description

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

The LowMemoryTask provides a Qtopia Server Task. Qtopia 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 Qtopia server and cannot be used by other Qtopia applications.


Member Function Documentation

LowMemoryTask::~LowMemoryTask ()   [virtual]

Destroys the LowMemoryTask instance.

void LowMemoryTask::showWarning ( const QString & title, const QString & body )   [signal]

Emitted whenever the LowMemoryTask requires the UI to display a message with specified title and body to the user.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3