Memory Notifications


#1

Xibo for Android will issue memory alerts when the application has been asked by Android to release its resources more than 10 times. It is normal and routine for Android to make these requests of running applications, however repeated requests can be a cause for concern.

When over 10 notifications have been received which affect the foreground application (Xibo is designed to run in the foreground), then the below log message will be output:

(1) Memory Notifications. Current level=(2) at Total: (3)MB. Used: (4)MB. Device Total: (5)MB. Device Free: (6)MB.

  1. The number of occurrences (should always be 10)
  2. The current “trim level” 5 = low memory, 15 = critical memory
  3. The total amount of memory allocated to Xibo
  4. The amount Xibo is currently using
  5. The total on the device (only available on some devices)
  6. The percentage free (only available on some devices)

onTrimMemory

Versions of Xibo for Android before 1.7 R52 reported each occurrence of a memory trim request - this only served to provide repeat notification, which often proved to be unnecessary.

Resolution

Memory alerts are often normal and nothing to worry about, however if repeated alerts occur in a consistent manner it may be an indication that another application installed on the device is consuming a lot of memory.

In these cases it is useful to look at the installed applications and remove unnecessary ones.

More information

Most of us are used to memory on our desktop/laptop PC’s, where we have 8GB of RAM and an application can consume all of the available memory on the PC without the operating system intervening. Android is fundamentally different as the operating system assigns each application an allocation of memory for it to use. This allocation is far less than the total available on the device and is actively managed by Android. If the application uses more than its allocation, it will be terminated by Android.

Android will also ask applications to “trim” their memory usage at certain points in their life cycle - it may do this because there is general memory pressure in the system and it would like to keep everything running. Android likes to keep everything running so that applications resume faster.

Xibo is designed to run in the foreground - always, which gives it a priority over other applications loaded into memory and should mean that it is last on the list for any memory management activity. However we are interested in tracking this activity so we can better understand how this has been implemented on different devices - hence logging the above message.


Introduction / Table of Contents
Frozen App on OPS_DRD
CMS error - socket failed: EMFILE