WM closes processes - General Questions and Answers

Hi guys,
I have discovered a really big problem - Windows Mobile closes running processes. Wow, I've just discovered an America, didn't I?...
The fact is that I did some searchings and applied a few tweaks promising this effect will be gone. But it isn't, WM still keeps closing my processes even when I have over 100MB free RAM. Just 5 (sometimes 6 or 7) open programs, no more.
So where is the problem?
I have more than 100MB free RAM
I have only 27 total processes running
I did soft reset few minutes ago
I don't use any RAM cleaning software
I don't even use HTC Task Manager
Still if I open one more program, the first opened just closes
I'm really getting pissed off, I just sometimes need to run more programs in one time, but it doesn't let me. I open calendar, but contacts disappear. I open contacts, opera disappears. Why? Please help me.
I'm using the ROM in my sig.

ZaxXx said:
Hi guys,
I have discovered a really big problem - Windows Mobile closes running processes. Wow, I've just discovered an America, didn't I?...
The fact is that I did some searchings and applied a few tweaks promising this effect will be gone. But it isn't, WM still keeps closing my processes even when I have over 100MB free RAM. Just 5 (sometimes 6 or 7) open programs, no more.
So where is the problem?
I have more than 100MB free RAM
I have only 27 total processes running
I did soft reset few minutes ago
I don't use any RAM cleaning software
I don't even use HTC Task Manager
Still if I open one more program, the first opened just closes
I'm really getting pissed off, I just sometimes need to run more programs in one time, but it doesn't let me. I open calendar, but contacts disappear. I open contacts, opera disappears. Why? Please help me.
I'm using the ROM in my sig.
Click to expand...
Click to collapse
Your problem is the limitations of WinCE 5, it can only use 32 process sloys, it will shutdown any new tasks after it gets to 32, i'm afraid its a limitation we have to live by but please, rewrite WM with no process limit my god would you get a lot of donations
Sorry

I know about the limit, that's why I wrote "I have only 27 total processes running" meaning "I have 27 processes and it doesn't let me open one more", so where are the 5 more missing?
EDIT: 23 processes when no app open. I can reach only 29 or something like that, but not 32.

ZaxXx said:
I know about the limit, that's why I wrote "I have only 27 total processes running" meaning "I have 27 processes and it doesn't let me open one more", so where are the 5 more missing?
EDIT: 23 processes when no app open. I can reach only 29 or something like that, but not 32.
Click to expand...
Click to collapse
Sorry, i miss understood
It must be a ROM fault, have you posted this in the thread, it may even be because it is a 6.1 ROM. i have no idea

Do you think it can be caused because I have changed the pagepool value in rom? I don't remember when these problems started, but I've changed the pagepool (from 9MB to 16MB, to increase speed and it really worked!) about month or two ago, so maybe that's the problem...

Related

Why doesn't microsofts own software have a exit button?

I think every software that i DL have a meny option "Exit" but microsofts own software thats included in the phone don't have this. I have to use task manager to quit this software. or Im i missing someting?
There's lots of software to do this eg Xbutton etc
yes maybe but why do they do it?
jonas18z said:
yes maybe but why do they do it?
Click to expand...
Click to collapse
Because they're Microsoft. That should be enough explanation. Actually, their explanation is that they consider it is more memory efficient to leave programs in memory and let windows allocate the memory itself.
^ what he said. Microsoft wants so much to demonstrate that these phones are perfectly capable of multitasking that someone on the higher end decided that all programs shall remain open.
Causes all types of problems if this is done for a prolonged period - Note to M$: you can't just port winDOS code to mobile and hope it works.
think old wm devices were slower for some of those mem loading tasks
and in general people were using the same applications again and again
in which case it was easier to minimize them
an application you start ONLY! use as much mem as it was written to use
so if it use 2MB it dont run any faster if you have a pda with 2GB
and if WM starts to get low on mem it itself will unallocate memory from programs which havent been access'd for awhile so the program which require the mem can have it
this is why you dont normaly get an outof mem error with alot of applications running
and if WM starts to get low on mem it itself will unallocate memory from programs which havent been access'd for awhile so the program which require the mem can have it
this is why you dont normaly get an outof mem error with alot of applications running
Click to expand...
Click to collapse
This has been proven to be patently false, I believe. WM2002 had out of memory errors. WM2003 won't allow anymore programs to run, and WM5 just hangs. Apparently M$ has a very, um, questionable definition about which program "hasn't been in use for awhile".
me too experienced out of mem errors repeatedly, usually it's enough to exit internet explorer which i use from time to time (it starts faster then opera and minimo)
Read this: http://blogs.msdn.com/windowsmobile/archive/2006/10/05/The-Emperor-Has-No-Close.aspx
the only microsoft application i've seen that actually closed and that had 'exit' option was comm manager i used for about a year. yesterday i changed rom (from 1.6.2.4 to T-Mobile 2.26 ROM) and i see that this mistake is corrected - the new comm manager present in this rom also has exit button, but as well as 'x' button it only minimises it. way to go M$! ;]

G1 Startup Manager

Running Applications
Hi, im considerably new to the whole android development i have a g1 since early december and have upgrade it to the modded JFC 1.31 ADP. I also have the adp spl i think thats what u call it .
My question relates to the running processes/tasks/programs. I am concerned about the amount of programs that run in the background. Is there a way to cut down on this?
I have already removed Calendar, Amazon, Calculator, Calendar Provider seeing as how i do not intend on using these as for calculator i have installed a scientific calculator.
Its more or less Facebook, Craigslist, Imeem. The other bckg progs Gmail, Messaging, Alarm Clock are all smth i use so therefore i have no issue on that but ive tried editing settings on Craigslist, Facebook, Imeem and others to change the update interval and have maxed those out but still tend to run in the background i use the programs but i dont need them to update themselves.
Edit: I have also stopped the auto sync on Calendar, Gmail, Contacts Seeing as for Calendar i dont need it, Gmail i check it often, Contacts i dont use on my gmail service.
Have you got the task manager app from the app store? Thats what I do, and kill all the apps I don't need active.
TimSykes said:
Have you got the task manager app from the app store? Thats what I do, and kill all the apps I don't need active.
Click to expand...
Click to collapse
Yes i have, however they keep coming back up!
yeah I know some of them do. to me I don't know why alarm does. I don't even have a alarm set on my phone.
They come back due to the way android handles and saves tasks. The OS will keep resurrecting them thinking they are just dormant and were axed by them.
ArronL said:
They come back due to the way android handles and saves tasks. The OS will keep resurrecting them thinking they are just dormant and were axed by them.
Click to expand...
Click to collapse
So is there a way around this or not?
yeah.. im having the same problem, i shut them all down via task manager, but after like 1 minute i go back in there and they all come back up, is there any way to make them be off permanentally till you use them again?
tbh, the way the android works, if it keeps bringing these programs back they're probably not eating up too much memory.
in fact, no matter how much crap is running in the background i've never experienced any lag or anything. makes me wonder if there's any point in killing apps, except for ones that may be constantly connected to the internet.
Meltus said:
tbh, the way the android works, if it keeps bringing these programs back they're probably not eating up too much memory.
in fact, no matter how much crap is running in the background i've never experienced any lag or anything. makes me wonder if there's any point in killing apps, except for ones that may be constantly connected to the internet.
Click to expand...
Click to collapse
Well i definitely notice a lag, although i agree with you on the applications i removed like 80% of them now just using ones i need and just installed the 1.41 everything works great. But run about 10apps let them run in the bckgs and slide the main application tab on the home screen up and down and scroll through the programs. Then kill about all apps but 3 to account for ones you need and try it again you should most likely notice a difference.
Not on lag but background processes use up battery to, I did a wipe and have like four apps on my phone: aim astro any cut and ak notepad (wow must like A's) but my battery life is noticible better than before, I can go a whole day with out having to charge vs having to charge every few hours
does anyone know of a startup manager for the G1 for EG when i reboot or start up my phone i get a lot of services and programs which i use but do not want to start on boot.
i can use task manager to close them once the phone is started but wouldt be happy for something that disables these from the start.
Has anyone found a way to modify what OEM apps boot at startup?
So using Task Manager for Root Users we get this peek into what's ?running? on our phone. or am i sadly confused..
upon initial boot and after letting the phone boot fully (about 3 minutes) i get this list in my taskmanager..
Task Manager ---not oem
Service Viewer ---not oem
MyFaves storage
Messaging
Voice Dialer
Google Talk
Maps
Calendar
Alarm Clock
Power Manager ---not oem
Missed Call ---not oem
Messaging
Phone Recorder ---not oem
MyFaves Storage
Voice Dialer
Google Talk
Maps
The list remains the same even after several refreshes..
...oddly only after killing a few tasks this is added?
Gmail
note: at this point in service viewer/tasks, only taskmanager, launcher and service viewer are present..
After killing every process through multiple refreshes messaging (which I assume is a critical app tied to the notification bar) is the only thing that remains until i load something else..
First question..are the apps listed in task manager actual hurting my battery/memory/cpu performance?
Secone question..Is there any way to auto-kill these tasks upon boot, other than by removing them? Or is there some boot.ini type file that could be editted?
sry for the long post, just curious if something can be done...
Yeah id also like to know how to manipulate what starts up on boot.
Any dev should be able to tell us.
Plenty of apps start at boot.
Seriously I would LOVE the answer to these questions. Thanks
Now while this isn't coming from a dev, when I look at the running app list I often see things I haven't touched, but they won't start unless the phone's been idle. I think what happens is it actively fills empty ram with programs so they will start faster, so I think it's just in the nature of Android.
Fushichou said:
Now while this isn't coming from a dev, when I look at the running app list I often see things I haven't touched, but they won't start unless the phone's been idle. I think what happens is it actively fills empty ram with programs so they will start faster, so I think it's just in the nature of Android.
Click to expand...
Click to collapse
yes but dont they use up cpu/memory/battery? plus i dont think the programs are so resource heavy that they would need a process running.
An answer from a Dev is what we need
I think what we need is an explaination as HOW a program can autostart on boot. If every program on my phone (stored to sd) started automatically when I turned on my phone I'll be waiting a week for it to start up. There has to be a script that these programs add to or something to run these program automatically. Either that or it's the programs themselves that are set up to start up by themselves. Where if that's the case I think we're screwed.
I'm also VERY interested in this.
Also, how to keep apps from auto-restarting once you kill them. PixelPipe has a background service that, once you start the app after reboot, it won't die. Their app support guy states otherwise tho, heh.
Also, I like how the OS says a program has "died"
I wouldn't really worry about it. For one most of those processes will be sleeping. They use no CPU time when they're in this state. Some processes register an event with the kernel and just sleep forever until that event occurs and the kernel reactivates the process. Some processes sleep for a specific amount of time, wake up and do some task, then go back to sleep. In both cases the number of CPU cycles being used are likely negligible. Most of those start-up programs will fall into one or the other category. The stuff that does take up a fair amount of CPU cycles are things like the multimedia system, the UI system, messenging, etc. In other words, the stuff you want to keep running.
Also, I wouldn't pay too much attention to those memory usage numbers. There's heavy use of shared libraries in the system. Ordinarily processes are only allowed to access memory that is allocated to them. This memory is where the process stores the bits that make up its code (stuff that doesn't change) and where it stores its working data (stuff that does change). Its actually more complicated than that but this will suffice for now. Libraries that are not shared are accessible only to the process that is using it and is stored in the memory allocated to it. Libraries that are shared can be used by multiple processes. These shared libraries are allocated to one place in RAM and when an app needs to use one of them the kernel takes care of mapping the location of the library so the app can access it as if it was in its own memory space.
The memory usage numbers you are seeing do not take into account these shared libraries. An app may be using only 1 or 2 MB of RAM but since it uses a shared library the RAM being used to hold the library is also counted and the size could be shown as 20 or 30 MB higher that what it actually is. You could kill a process and recover some memory but its probably not enough to be worth it since more than likely most of the RAM being used was in shared libraries and they'll still be there after the process is gone.
numerik, thanks for the info. But now I guess my bigger concern would have to do with this part:
Some processes sleep for a specific amount of time, wake up and do some task, then go back to sleep.
Click to expand...
Click to collapse
Similar to the problems we run into in windows. Some lame program gets added to msconfig (be it a m$ app or wicked virus), it sits there idle when you fire up your computer uses a minimal amount of cpu amd memory then does who knows what whenever it wants.

Free RAM issue!

hi there...am a big fan of the vox....but the problem that i face after say 2-3 days of continuous use is the memory leak. it has abt 22 mb free when i soft reset, but after this time, has less than 10 mb remaining. i shut down programs regularly, use the hibernate function on smart toolkit, and i use sk tools lite to use the memory free function. could anyone solve this problem? i read somewhere that a rom upgrade may solve this issue. tried the htc website, it says the rom upgrade is not suitable for my device. can someone help? someone like dr. martin gonzo or frauhottellmann? r u there? my device details are below
CE OS 5.2.1236
Radio 4.1.13.41_02.88.90
ril version 2.002
Pls tell me which ROM is the most stable, if i need to update any thing else too that is available on this forum/ I have photo contacts pro v 5.05 andfacade 1.4.10 running in the background.
Oh i forgot. I use smart toolkit too
The ROM is 5.2.1236.17741
I would prefer a light ROM, as I dont use word mobile. I have documents to go instead.
scanman1 said:
hi there...am a big........
I would prefer a light ROM, as I dont use word mobile. I have documents to go instead.
Click to expand...
Click to collapse
Try fireburned's Clean ROM or fraun's Lite ROM, both of them are super fast and super stable .
Backup - some doubts
thanx.....downloaded it, will it work and install with my vox as per the details ive mentioned above?
my second query....im not too particular abt my messages and stuff, and ive just synchronised the data on my mobile to outlook ( contacts, tasks and appointments )....is this enough or must i properly back up everything else? pls lemme know. as ive never flashed a rom before.
also, will flashing a new rom delete the stuff on my storage card?
scanman1 said:
thanx.....downloaded it, will it work and install with my vox as per the details ive mentioned above?
my second query....im not too particular abt my messages and stuff, and ive just synchronised the data on my mobile to outlook ( contacts, tasks and appointments )....is this enough or must i properly back up everything else? pls lemme know. as ive never flashed a rom before.
also, will flashing a new rom delete the stuff on my storage card?
Click to expand...
Click to collapse
Search for PIM backup, that is a software which back up all your PIM information to Storage card, or whatever folder you wish. No flashing will not delete anything from the storage card. But be sure that you are not using Encryption on the SD Card.
thats ok...i have sprite backup with my phone. will have to reinstall it though/
my question is....is a fullback up necessary or will an outlook sync be enough? when i reconnect after the flash, active sync will set up a partnership again right? will that delete all the outlook data stored on my comp or will my comp refill the pim data back on to my device? thats what i want to know.
also, will the new rom significantly alter my battery life? am a doctor, and it may not be possible for me to keep charging my mobile when i am on rounds and so on
one more doubt, addicted2xda. will flashing one of these custom roms solve the memory leak issue? its driving me crazy. cant go 3 days without doing a hard reset. and how much will teh free memory be with say, fireburned lite rom?
Well after a couple of days you will of course have less RAM available. You always have to close apps in the task manager and use some RAM-free-up app! I use the function of sktools lite!
frauhottelmann said:
Well after a couple of days you will of course have less RAM available. You always have to close apps in the task manager and use some RAM-free-up app! I use the function of sktools lite!
Click to expand...
Click to collapse
yes boss...i use sk tools lite too. but it doesnt make too significant a difference, with the end result that after say 3-4 days, memory dips to less than 8 MB, and voila! my phone hangs!
am now trying out fireburned's lite rom, seems good for now. lets see! any further ideas to minimise the ram leak?
Use the taskmanager - as frauhottelman said already - to identify the processes that grow over time. You can use the built-in, just change the view to "process" and sort by memory. WMPlayer or Audiomanager are memory hogs from my experience.
For debugging you may also want to execute "devicehealth.exe". This will create a decent summary of memory consumption to the root (or card-root). You may have to search for it (in the forum or or the web). It is a tiny tool from the SDK afaik.
tobbbie said:
Use the taskmanager - as frauhottelman said already - to identify the processes that grow over time. You can use the built-in, just change the view to "process" and sort by memory. WMPlayer or Audiomanager are memory hogs from my experience.
For debugging you may also want to execute "devicehealth.exe". This will create a decent summary of memory consumption to the root (or card-root). You may have to search for it (in the forum or or the web). It is a tiny tool from the SDK afaik.
Click to expand...
Click to collapse
have been using fireburned's rom, seems pretty stable. however, after doing a sync with active sync, the memory which was say 17 mb, dips to 14 mb or less. any hibernate function or say, the task manager or even the sk tools function brings it back to only about 15 mb or a little marginally higher. the more times i use activesync, the same problem occurs. say i use it three times, the memory lands up around 12 mb, after all programs have been shut down. and after using the hibernate function on smart toolkit. any ideas? did a search and found that it s a process called gwes.exe which hogs memory mostly. but this is guess is a system process and cant be shut down i suppose. any suggestions? ur take on this, frauhottellmann?
Still problem not solved!
hmm..tried using the ram free function on sktools. seems to actually decrease the amount of ram available!!! and with each use of active sync, the available ram decreases sharply. my wife has an imate spl, and the amount of ram remains constant around 25MB even after 10 days....anyone have any ideas? have read somewhere that it is a problem peculiar to vox. the problem with decreasing ram is, after 3-4 days, the dialler starts malfunctioning. i am able to make out the calls ringing, but no way i can pick itup. max, i can cut the call. it registers as a missed call....any body with any ideas out there? any way to cut the ram leak?
one more doubt,,,the old sk tools had an optimize wizard. the latest one seems to be lacking this feature. is there anyway that the active sync filesystem can be made read-only ?
Pretty strange. Are you using any third party software that may be causing the problem? Also note that after using activesync, it doesn't shutdown on its own. You have to manually shut it down to release the memory. Further try using the default home screen, instead of the sliding panel which comes with new 6.1 ROMs.
Because I normally have more than 20 MB free . No matter how long I have kept my device on.
Or better still, just reboot the device before going to bed .
yeah. i use photocontacts pro and smart toolkit in addition to microsoft voice command. and is it a good idea to keep rebooting the device daily? i thought the rom upgrade was supposed to fix that!and i love the sliding panels. the default homescreeen sucks
scanman1 said:
yeah. i use photocontacts pro and smart toolkit in addition to microsoft voice command. and is it a good idea to keep rebooting the device daily? i thought the rom upgrade was supposed to fix that!and i love the sliding panels. the default homescreeen sucks
Click to expand...
Click to collapse
Sliding panel really drains the battery like hell. Its not a problem if you reboot your ROM daily. I flash my device (both), well almost once a week atleast . So that requires rebooting as well. I really don't know whats wrong, but I never had the RAM issue, try fireburned Clean ROM or fraun's lite ROM for a change and see if you find any difference
I have same problem with my htc vox

Auto Program Closing ?!

Hy,
I'm using my own cooked WM6.1 rom, but i noticed that the programs in background automatically closes in some minutes.
Example:
I'm using webcam plus in screen mode, works perfectly. I open an application on ppc, leaving the webcam plus running and sending the screen, but after some seconds (~5-10 secs), the screen freezes on the PC, and when i open task manager theres no Webcam plus. Same with other programs too.
can it be the wrong pagepool? i think i have set it to 8 mb
i have 45 mb total program memory, usually 15 free, and its hardly ever goes higher than 80% usage (because programs closes?)...
whats the problem, and how can i stop it?
thx
CheeseDave said:
Hy,
I'm using my own cooked WM6.1 rom, but i noticed that the programs in background automatically closes in some minutes.
Example:
I'm using webcam plus in screen mode, works perfectly. I open an application on ppc, leaving the webcam plus running and sending the screen, but after some seconds (~5-10 secs), the screen freezes on the PC, and when i open task manager theres no Webcam plus. Same with other programs too.
can it be the wrong pagepool? i think i have set it to 8 mb
i have 45 mb total program memory, usually 15 free, and its hardly ever goes higher than 80% usage (because programs closes?)...
whats the problem, and how can i stop it?
thx
Click to expand...
Click to collapse
It really depends on the memory that that program you open needs. What is it that you're opening?
ivanmmj said:
It really depends on the memory that that program you open needs. What is it that you're opening?
Click to expand...
Click to collapse
iPaint, im drawing some lines, and the webcam program closes. but i dont think i havent got enough memory, it must be at least 10 mb free when its happening..
Okay, I see. My mobile can run out of memory while 2 program runs. But are there any way to disable to close them? It's vry bad that i can't listen to music while sending an SMS or anything...
If you're running out of memory, there is nothing you can do but get more memory. Either bring the pagepool down to 4mb and gain an extra 4mb or find another way to increase your RAM.
Okay, thanks for your help.
I didnt want more ram, I just though when theres no enough ram, the program slows down, and the windows tryin to get some more ram from the system files (just like in windows vista), but its closes my applications not the system (eg gwes is always around ~7M or more..) :O
I've got my phone for a couple of months, and before this rom i remember I played age of empires 2, with windows media player in the background, it was laggy, but it worked and the music player didnt closed while playing...
CheeseDave said:
Okay, thanks for your help.
I didnt want more ram, I just though when theres no enough ram, the program slows down, and the windows tryin to get some more ram from the system files (just like in windows vista), but its closes my applications not the system (eg gwes is always around ~7M or more..) :O
I've got my phone for a couple of months, and before this rom i remember I played age of empires 2, with windows media player in the background, it was laggy, but it worked and the music player didnt closed while playing...
Click to expand...
Click to collapse
Windows Mobile doesn't use a swap file like the real windows does. It doesn't slow down due to swap file usage, it just closes programs. What ROM were you using before? It probably had more free RAM.
I think it was the original HTC rom for herald.
I changed the pagepool to 6M (cause i read that 4m can slow it down), now its okay. Thanks for your help.
It also happens with my Hermes and Raphael..
It also happens with my Hermes and Raphael..
My Hermes (Dopod 838 pro) running official WM6 ROM
My Raphael (HTC Touch Pro) running stock WM6.1 ROM (Version 1.9)
It's a big problem, I can't keep my Twitter,downloader, and Messenger app to run at the background..
I have disabled the "auto kill" in HTC Task Manager with "Andvanced Config"..
I also have change the "memory thereshold" to 0 MB, then tried 1 MB, but the problem still there..

*RANT* bad Android memory management

Guys I have problem with Android smartphones. I am not the youngest anymore and remember the first PCs and first smartphones with 32x less memory then an average handheld device has today. I played with them all and know what they could do. The thing that still continues to surprise me till today on Android is WHY the heck can't an app stay in memory without being quit on the first occasion?? I really think that Android will never be usable for any serious work if things keep closing or reloading just after a few switches between apps!
Some examples: why can't I switch between Chrome browser and Onenote to type something without having that webpage be reloaded again using more data and sucking more battery power? I learned not to risk writing any bigger post into some forum lately because if I would have to switch to another tab to check some info or switch to another app the in progress text would most likely be lost because webpage would reload! Why is it so risky to switch out of some game to write a message or check calendar because it is very likely to be killed and my progress lost? The phones I used recently (Xiaomi Mi2s, Xperia Z3 compact, Xperia Z5 compact) have frikin 2GB of memory, so I wonder if nowadays apps are so much more memory demanding then before that this is simply still not sufficient. I just checked settings and some apps I just tested use few tens of MB, so it is still comparable to the times of Windows 98 or Windows mobile IMHO.
My first smartphone was windows mobile Samsung Omnia II with just around 90MB of usable memory and let me tell you that this problem was not happening on it! I could have several tabs with webpages (even non mobile versions) open and could safely switch on the camera, take pictures, write an sms and go back without having to worry that anything will be closed or reloaded! Why can't I open a camera app on Android and take a photo without having the previously open app be closed?
I can even compare today's android phones to one of my oldest pcs back in year 2000 or so. Imagine that it had just 64MB of RAM. I could have open many webpages in Internet Explorer (yeah it was far the best at that time , a few editors for web and text editing and I could even play some game and alt+tab back and forth without any problem! That was Windows 98 guys. Of course you will tell me that today's web pages for example are much bigger then in 2000. OK but what about mobile versions huh? I don't think they are that big so a phone with 2GB of RAM would choke.
I always thought that apps are supposed to be paused/frozen when I switch out of them but left in memory. Unfortunately it seems apps are being killed surprisingly often even when settings / memory shows hundreds of RAM free. The thing that is even more weird to me is that apps I had open just a few seconds ago are being closed upon switching to some other one and back, but the ones which I had active hours ago often stay in memory! That does not make much sense. Why doesn't android kill the longest not active apps first instead? OK, so do I have to buy OnePlus 3 or Meizu Pro 6 with 6GB of RAM to be able to keep simple 3 apps open without worrying that they will reload when switching out of them? As I showed this does not happen on much older devices with similar specs, so is this some fundamental flaw/feature of Android architecture or am I missing some simple explanation?
If you have experience with Windows Phones or iOS regarding this please share and compare.
So it seems everybody agrees
But I would really like to know some of your experience with other phones from the fruit company for example...
java
---------- Post added at 07:20 PM ---------- Previous post was at 07:11 PM ----------
> Why doesn't android kill the longest not active apps first instead?
There is some heuristic going on that calculate the oom priority and modifies /proc/PID/oom_adj so. For example (foreground) services have lower oom_adj (less likely to be killed by oom-killer). Actually I ended up adding code to my app that overrides /proc/PID/oom_adj to a really low number to keep it running (but that requires root - I also dont understand why *the user* does not have a chance to say "hey android keep running this app in the background!")
> Unfortunately it seems apps are being killed surprisingly often even when settings / memory shows hundreds of RAM free
Yeah that "low memory value" (ie when to kick off the oom-killer) is also set somewhere in /proc (?) It's 200MB on my phone with 2 gigs ram IIRC. To test what's getting killed (and whenl, etc.) this app is superb: https://play.google.com/store/apps/details?id=com.tspoon.androidtoolbelt
it's all even more annoying because starting even basic apps (like dialer or contacts etc. etc.) takes even seconds(!) if they are not in memory already (on any phone!) ... oh, well, java
Thanks for a reply! Have anybody tried MIUI? There is an option to lock an application and supposedly prevent it from being killed when multitasking. Just swipe up in tasks view and it marks it with a lock. I have just read this article and it seems manufacturers set these LMK values. I have a feeling they are really high for Sony phones. Maybe if I root mine I would be able to change those. Unfortunately it seems without root I cannot even view these values. They show as 0 in /sys/module/lowmemorykiller/parameters/ and cannot be opened. I can't open those oom files either.
yeah, defo need root for this
Oh and it gets worse. Because of this behaviour many apps use a nasty trick of setting up an alarm (usually with wake lock) triggered every second to make sure they are running (if a process is not running and there is an alarm for that process set up, the process is started).
So what happens is that the OOM/low-memory killer kills the app it is started by android framework the next second ... and it might get killed by oom-kiler again ...
It's interesting to run "apktool d foobar.apk" and grep the smali for "AlarmManager.set" on apps that want to run in the background ...
CleanMaster app is good and it saved me from exhausted internal capacity issues many times (on Z3Compact) and it also shows apps which frequently restart. Is that because of what you just wrote? I remember it was Pinterest a lot for example.
and it also shows apps which frequently restart. Is that because of what you just wrote? I remember it was Pinterest a lot for example.
Click to expand...
Click to collapse
sounds like it could be the case but you it's hard to tell for sure - you would have to have a look at logcat at least
I have logcat. What would you search for there?

Categories

Resources