[Defy Android Development] okij:
Update about memory leaks: CM10.1 is still eating RAM...

I tested [MENTION=513620]Quarx[/MENTION] current 07-09 Nightly (without [MENTION=4855459]Blechd0se[/MENTION]'s 07-08 kernel) for a couple of days (actually for 4 days and 5 hours, which is roundabout 100 hours) to see how it behaves in terms of stability, usability and memory leaks.

First about the positive things - stability and usability:

As others already have pointed out, the 07-09 Nightly is running very stable and smooth. I happily used it without reboots in those 4 days. :)

Now about the not-so-positive things - memory leaks:

Once per day I looked at the available memory right after using the "Killing Tasks" feature of the TrustGo Antivirus & Mobile Security app. Unfortunately, I could see that it dropped by a quite constant 20 MB/day. :(

Before the available memory got too tight (which usually happens at an uptime of about 5 days and leads to a very slow and unusable system), I decided to do a manual reboot after those 4 days and 5 hours.

To give you some numbers, I made 3 screenshots before reboot and another 3 screenshots after reboot (and after the system settled for about 6 minutes.)

You can see that before the reboot (and right after using the "Killing Tasks" feature), TrustGo reports 117 MB of available memory, whereas after the reboot (again after "Killing Tasks"), TrustGo reports 202 MB. This is a difference of 85 MB or quite exactly 20 MB / day with an uptime of 4 days 5 hours.

The other four screenshots show the "Tasks" tab of Android System Info, two of them before reboot (the second of those just after scrolling down to show the bottom of the list), two of them after reboot (the second also with the bottom of the list).

What is interesting about the memory-consumption per task:

Android System used about 14 MB more before the reboot (i.e. after 4 days uptime)

System-UI used about 13 MB more before the reboot

Apex Launcher used about 11 MB more before the reboot

android.process.acore didn't run after the reboot, before it used about 33 MB

there were two instances of com.google.process.gapps running before the reboot (is this normal?), each using about 20 MB, whereas after the reboot only one instance of it was running

All in all, if you add the memory consumption of all Tasks (I did this in Excel), it sums up to about 595 MB before reboot and 514 MB after reboot. While the difference of about 81 MB is quite the same as the difference of 85 MB measured with TrustGo, I'm wondering how the sum can be more than 477 MB, our available memory under CM10.1? :confused: I'm not sure if Android System Info probably reports too high numbers and if some Unix command line commands would give more accurate results!? (Maybe someone could test this? :))

Anyhow, IMHO the memory leak (besides the problems with Bluetooth headsets) is a very important bug to be fixed, because it prevents a stable use (without manual rebooting every 3-5 days) of CM10 / CM10.1 with some of the more memory consuming apps and games. In comparison, I could use Android 2.3.x for several weeks in a row without rebooting.

Therefore, it would be great if our devs could have an in-depth look into this issue and hopefully find the culprit in the source code. :D Unfortunately I'm not a programmer myself, but I imagine that some system function for freeing memory doesn't work properly so that it doesn't free up all of the memory that was allocated before. :confused:

I'm crossing my fingers and I would be happy to help testing some improvements about this issue! :fingers-crossed:

edit: There is one other bug that would be great to have fixed: missing IMEI number. I know that rebooting usually helps, but sometimes I have to reboot two or three times to have it back and I really need a working IMEI number because both MyPhoneExplorer and Navigon need it. I know that this bug exists in all CM10/CM10.1 versions, but a fix or workaround would be really welcome! :D