Friday, December 2, 2016

4.0 ice cream sandwich - 0 ram free on ICS


I'm new to the ICS os, coming from Gingerbread from another phone. The phone's quite nice and fast when I first used it, but just this morning it started exhibiting weird actions. Camera360 doesn't open up automatically when I click it, the Camera closes for no reason, Pocket restarts when an article has an image, and TTPod resets the song to the previous song on my widget in the middle of a new song I'm playing.


I checked out the ram, and and was surprised to see 500+ mb used, 0 mb available. I looked at the list of programs and I see the usual culprits like Facebook, but the ram they're using doesn't add up to 500+ mb. Yeah, I know that the whole ram indicated isn't usable by the apps, but I don't think I've done anything to warrant the 0 mb. I close my apps. There are times when there's free 4 to 5 mb, but I think that too shouldn't be the case. I tried installing Advance Task Killer, it listed less than 10 apps, killed it, still the ram is what it is above.



I did a reboot, and now it reads 300+ mb usage, 200 something free.


What can I do? How do I ensure an app's closed on ICS? I installed GoLaucher because it has a handy task killer and I can see the ram freed in an instant, but I would like to know if there's a better way to handle the RAM.



Answer



While it's quite unusual to really have 0 byte free, there is no such thing as "unused RAM" on Linux/Unix based systems. RAM that's not used by apps themselves is used to e.g. buffer data from slower media, and caching stuff from the file system. You will see that quite nicely when running the free command on a command line (using a terminal emulator app, or via adb shell). An example (here from a rooted Android running the Terminal Emulator app) looks like this:


An Android Terminal Emulator running the 'free' command


Note the high numbers for "buffers" and "cached" -- which are the reason why the RAM used by apps plus the amount of free RAM "doesn't add up" to the total RAM available. Nothing to worry about.


As for Task Killers: Kill them, they won't do you much good. True they can be useful -- but not in this context: use them to kill hanging/misbehaving apps e.g. hogging your CPU and won't quit otherwise. But it makes absolutely no sense to use them to "free RAM" or "save battery" -- to the contrary: most "killed" apps will simply re-launch themselves immediately, using the same RAM again -- but needing more battery for the relaunch then they'd used had you not killed them. To close apps, exit them via the back button (not the home button). If the dev designed them well, this should place them on the "exit list" (check for "OOM killer" and "application life cycle" if you want more technical details).


Don't worry about handling the RAM -- Android does a good job here already on its own :)


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...