[T-Mobile LG G2x] mstrk242:
Just to chime in on the memory/lag issue, you're all half right and half wrong.

First off, you're not taking swap into account. When android has an app running "in the background" (not currently displaying on the screen), they system will then be allowed to kill the application in memory to free up memory for other processes if it's needed. When this happens, however, it first uses system calls to poll the app to see if it needs/wants to stay persistant. This means it will keep working in ram, regardless of whether the app is in focus now or not (displayed.) Android will take the lowest priority apps and kill them first. Most apps that are coded efficiently, will only have certain parts of the app persistant. For example, a browser will close, but it might keep in the current location (web page) in memory, or google maps might keep your current location in memory, and kill the rest. This way, when the app restarts, it still has all the data in ram, and therefore comes right back to the same place it was. This gives the user the illusion that it was running in the background the whole time, it wasn't.

The problem is that a swap file (or swap partition, same general idea) is a part of the system storage that's reserved to be used as extra ram when the system runs out. This is much slower, because reading/writing off the internal memory will always be infinitely slower than reading/writing to ram. (Plus it consumes more power.) This essentially kills android/linux's excellent memory management. The system doesn't differentiate between swap ram and system ram. When you run out of memory and you're swapping, you're copying chunks of memory containing information (pages) from ram to the swap location. (Which is why in windows it's referred to as a pagefile.) Then, when it's needed, it swaps out a different part of ram, and puts the part on storage back in. This is not a very fast process. The swap file is why you guys are getting lag spikes with a2dp when ram is full, and why the phone can get laggy.

Now, if you have 200 megs free ram, or 20 megs free ram, the system will run at the same speed. Free ram does not equal performance, infact it's wasted ram. If you have a laptop with 8 gb's of ram, and you never even under the highest load use more than 3, that's 5gbs of wasted ram. It doesn't effect the system performance at all, it just drains more power from the system. (on a pc this is minimal anyways, except laptops, or anything that runs on batteries.)

You guys are thinking in terms of windows, not linux. Windows, when an application is running in the background, it's actually running. It's using system resources, (ram, and usually a little bit of cpu time as well.) On android, that's just not the way it works. Also, a poorly coded application can easily mess up androids memory management system by either staying 100% persistant (keeping it all in ram when not required) or by marking themselves as high-level processes that don't get polled to be killed when ram is low.

As far as the app killer programs, it's really counter-productive. The thing that kills battery life on these phones are the screen, radio-chip, and cpu usage and internal memory reading/writing. Those are the 4 big battery drainers. When the app is in the background, for the most part, it's not using any of those. It's staying in ram, but ram usage (short of massive swapping) doesn't drain the battery very much. App killers also (from what I can tell, I could be wrong on this one point) don't poll the process to allow persistant state, it just closes it. That translates into more battery being used, not less. I'm a firm believer that all the people who swear by app killers have one if not multiple applications they run that are just bad apps, and drain the battery even when in the background by staying persistant or telling the system they're high-priority apps. In this case, the app killer is stopping these, but they are so badly written that the apps shouldn't really be used in the first place. A properly setup android system, with well-behaving apps, should never need an app killer.

Sorry for the hijack, and I know this is an overly-general description of swapping and android memory mangement. I tried not to get too technical so everyone could understand. If you want true technical details, however, google is your friend.