Important Notice: Due to repeated WikiSPAM attacks it was nessesary to change the access policy! Only registered users can now edit.

Info/Memory Leak

From UIQ3 open-source software

Jump to: navigation, search
Main Page > Office > Info/Memory Leak

Contents

Garbarge Collector

Symbian OS uses a Garbage Collector as memory manager - in theory this should ease programming.

However Until Symbian 9.5 Symbian only uses an inferior non moving collector. (To be fair: moving collectors don't go well with programming languages which support pointer arithmetic)

With a non moving collector memory becomes fragmented into ever smaller parts until larger memory requests cannot be satisfied any more. To make matter worse: Fragmentation happens a lot quicker of only little free space is available - Which is the case for early UIQ3 phones.

This leads to the dreaded "Restart to improve performance" as restarting is the ultimate way to reclaim and compact all memory. Just ending all programs won't help since there are quite a few programs on the phone which will never end.

As mentioned Symbian 9.5 rectifies this shortcomings and now uses a moving collector which will be able to re-arrange memory so that free memory will be available as one great continues lump.

XIP or the lack of it

Prior to SymbianOS 9.0, many Symbian devices used XIP (eXecute In Place) NOR based memory, which mean nothing had to be loaded into RAM to execute, but this came at the cost of very slow write times. Starting with 9.0, most devices moved to a NAND based memory system, which does not support XIP, and so EVERYTHING has to be loaded into RAM (and kept there) in order to execute. That's why it takes over 40MB of RAM to run the system, as everything is kept at all times.

OS Services

Some users are concerned since the phone does not report the same amount of free memory at startup as it does after being used for a while. This is due the fact that the OS is very much a "late creation" system - in the majority of cases applications or features only get loaded into the system the first time you use them. This means that after using the phone for a while it will have loaded in lots of system resources that weren't loaded in on first start up (when you hadn't started using all functions). Hence shutting down all user applications will not restore you to the level of free RAM you had at first startup of the device, since the OS itself keeps some resources loaded for future use and therefore is now using more memory. This could be mistaken for a memory leak, which it is not.

Multitaking and automated Shutdown

The UIQ 3 software design of the device is such that it by default leaves all applications running so you can easily switch between them (multitask). Only when the RAM drops below a certain limit does the system take action to restore some RAM. The Memory Manager handles this and shuts things down progressively. To start with, it requests idle background applications to shutdown, resorting to forced shut down of applications only when necessary. Expressed a little differently, in order to improve user experience the phone tries to keep as many applications active as possible and only closes down applications when absolutely necessary, so in normal operation of the phone, there should be almost no free RAM. This is as designed and is not a memory leak.

Task Lists

The task list application reports only some of the RAM used by applications, i.e. it only shows how much RAM they allocated at start-up. E.g. it may say the Web browser uses up only 115K, when it is actually using several megabytes when you are viewing webpages. Hence if the user looks to the Task List application to understand what is using up all the RAM, he/she will think the applications are using up only a small part and that the phone "leaks" the rest of the RAM, which is not the case.

Personal tools