This section explains the OOM Monitor priority and the values that can be set.
To release RAM the OOM Monitor uses priorities to determine the order of closing the applications. The OOM Monitor assigns priority for each application which determines the order (in relation to other applications) of closing the application.
A priority of an application is a measure of impact to the mobile device user in case the OOM Monitor closes that application. Thus closing a low priority application means that it will have a minimum impact on the user. And closing of high priority application will have a high impact on the user.
The OOM Monitor closes the lowest priority application first as this will have the smallest impact on the user. It will continue to close the applications until the amount of the free RAM is above the GOOD_RAM_THRESHOLD value.
If two or more applications have the same priority the OOM Monitor closes these applications based on their idle time. The application that has stayed idle for the longest time will be closed first.
The priority of each internal application can be defined in the OOM Monitor configuration file. If the priority of an application is not defined it will have the default priority. Default priority is also defined in the configuration file.
The priority of an application is not always constant. OOM Monitor configuration file can contain rules that determine how the priority is changed for an application when its idle time gets longer or when the foreground application is changed. For more information on the rules that can be set to change priorities, refer to Rules to change priority dynamically
Third-party applications can use the following priorities:
Normal (default priority)
High
Busy (infinite priority)
By default the priority of a third-party application is Normal but it is possible to change the priority as required. For information on increasing the priority of a third-party application, see Increasing the Priority of a Third-Party Application
The OOM Monitor cannot close a foreground application. The device user can also define the Busy priority for background applications which means that those applications are never closed by the OOM Monitor. For information on how to change the priority of an application to Busy, refer to Changing the Priority.