Protect music player from being killed? I am using an SGS+ with 512 MB RAM (which leaves about 380M for the OS) running the CyanogenMod 10.1 Beta build 2013-04-15 (Android 4.2.2 on Linux 3.0.73-rc1-PhenomKernel-V3) and as soon as firefox has to load a page with a couple more gifs or large images the music player (Apollo) is being killed. I'd rather have the front app being killed than having to stop listening to music.

I tried the App RAM Manager Pro on setting Hard Multitasking without any success.

So, how do I protect the muisc player from being killed?
Couple options :


Use the swap file feature of your RAM Manager.  That'll give you more (up to 256MB more) memory to play with and might be enough to stave off the music player kill.
Toss the RAM Manager and use something (Like MinFreeManager or manually edit the values in /sys/module/lowmemorykiller/parameters/minfree1) that will let you manually specify the Low Memory Killer's parameters.


For the latter, since your priorities aren't the usual ones (kill foreground before killing background, rather than the other way around), you want to toss the presets (which assume "the usual priorities") and set the values as such.  Specifically, you want to set the VISIBLE_APP (an app that is not on screen, but is doing something, in this case, cranking out tunes) value to be lower (and thus lower on the kill list) than the FOREGROUND_APP (exactly what it says on the tin) value.

Further information on what the LMK does and what all these values mean can be found on my answer to this question, which is probably more relevant to your question than the one it was an answer to.

1As I mention in my other answer, values in this file are in pages, which are 4KB.  8192, for example, is 32MB.