Home · All Classes · Grouped Classes · Annotated · Functions

Managing Memory Usage

Shared Memory Cache

Qtopia performs adequately with 64 Mb RAM; however a system using half this amount on say, shared memory cache and backing store will not have acceptable performance. A constant: QGLOBAL_PIXMAP_CACHE_LIMIT is provided to aid memory management for systems with large, high bit per pixel(bpp) screens and is defined in src/libraries/qtopiabase/qglobalpixmapcache.h as follows:

    #define QGLOBAL_PIXMAP_CACHE_LIMIT 1048576

This constant determines the size of the shared memory cache that Qtopia uses and depends on the user device. The shared memory cache holds pixmaps that are common between applications with the most important being the background image. The size of the background image depends on the size and depth of the screen, for example:

Considering that more than just the background image is in the shared memory cache, for example, it also holds other images and potentially font information, the shared memory buffer must be resized relative to the size of the background image. So, for example, a 640x480x32 bpp system needs to allocate 12 Mb to the shared memory cache. A potential rule-of-thumb is that a shared memory cache needs twice as large as the background image should suffice, however it may reduce the potential benefit.

free Utility

Memory usage can be determined by using the free utility with cached memory considered to be free. By running qpe with memory options specified memory usage can be reduced and overall performance increased.

For example, specifying:

    -fontfamilies helvetica -iconsizes 14 -languages en_US

without options results in qpe using 12M, however with options qpe uses 7.3M.

Removing applications that are not required will also increase startup and performance as the number of icons to load into memory is decreased.


Copyright © 2007 Trolltech Trademarks
Qtopia 4.2.5