X10 Memory Leak? - XPERIA X10 General

I have noticed behaviour pointing to a memory leak on the X10 - After turning the phone on, I get less and less free memory after running ATK - over 110 MB right after turning the phone on to ~70 MB after 24+ hours.
The phone is heavily modified/customized, so it may not be an SE sw bug (ADW, Smart Keyboard, handcent, k9, etc...)
What's the best process tool you can recommend to look into this?

Let the phone handle the memory. dont worry.

+1 on that. Android its linux based and us meant to work like that. Empty memory is wasted memory.
-------------------------------------
Sent from my X10i

Android may be Linux based, but if *after killing all idle processes* memory is systematically dwindling, that means/may mean that one or more of these processes is allocating memory which it is then NOT being released - either by the process (more probable) or the system itself (less probable).
In other words, for the same set of running processes/applications , the memory usage should *not* systematically go up over time.
Linux itself has no automatic GC. Android does (Dalvik VM), but it takes some care from developers for that to work properly - no "loose" pointers to unused but still-referenced data, etc....

acmbc said:
Android may be Linux based, but if *after killing all idle processes* memory is systematically dwindling, that means/may mean that one or more of these processes is allocating memory which it is then NOT being released - either by the process (more probable) or the system itself (less probable).
In other words, for the same set of running processes/applications , the memory usage should *not* systematically go up over time.
Click to expand...
Click to collapse
I disagree, as processes are used/exercised the kernel will allocate the memory they need, after switching on the phone the processes are idle and occupy a small amount of memory. As they are used the process size will grow in main memory as they store or cache common data used by the process. That is why applications such as facebook may be slower at start off as the data needs to be supplied, once this data is cached it will run much faster as the data is already in main memory.
Linux/Android works on the principle that it's a waste not to use as much memory as possible.

Not to get into a GC flame war here: The principle you mention is right, its just that after one KILLS these processes (facebook for example) ALL OF the memory allocated by facebook should be relinquished to the system (ergo, appear as free).
I.e. if I start up my phone, and just have processes A B and C running and have lets say 120 MB free, and after using the phone for a while kill everything and *restart* ONLY processes A B and C, then I should have 120 MB free. At least tendentially (may have a different set of resident libs at the 1st and 2nd points in time, some other minor stuff may be different, etc..). However, I find that doing this over and over results in less and less free memory being available as time passes.
I am not saying I am *right* but a good process inspection tool would help to ascertain what is going on.

acmbc said:
Not to get into a GC flame war here: The principle you mention is right, its just that after one KILLS these processes (facebook for example) ALL OF the memory allocated by facebook should be relinquished to the system (ergo, appear as free).
I.e. if I start up my phone, and just have processes A B and C running and have lets say 120 MB free, and after using the phone for a while kill everything and *restart* ONLY processes A B and C, then I should have 120 MB free. At least tendentially (may have a different set of resident libs at the 1st and 2nd points in time, some other minor stuff may be different, etc..). However, I find that doing this over and over results in less and less free memory being available as time passes.
I am not saying I am *right* but a good process inspection tool would help to ascertain what is going on.
Click to expand...
Click to collapse
Wrong.. it should NOT be returned to the system.. but it should be marked as "disposable" IF another process wants to use it. That is the way linux usually do.. That is why the "Free"-value is misleading. As the "Free"-value is not the sum of "Free" and "Cached" values. when you "unload" a lib it is not completely removed from memory, it is just marked as "cached" instead. Saving tremendous ( ) amount of battery and time when, if, the user wants to use it again before overwritten by another memory-hungry application..
Regards // OwL

does all this mean we don't really need advanced task killer?
or does the advanced task killer kill the cpu process? ( as a result longer battery life)

robbyf66 said:
does all this mean we don't really need advanced task killer?
or does the advanced task killer kill the cpu process? ( as a result longer battery life)
Click to expand...
Click to collapse
advanced task killer kills the application itself, so that nothing more is executed by that application thread(s). wether dependent libraries are kept loaded or not does not affect battery time when not used. Advanced task killer does not actually unload any libraries it only kills the process.
I personally hardly never use advanced task killer, as it is not needed as long as you make sure to run applications that does not keep the phone from going into sleepmode. Those programs are just simply bad coded.. I instead have a CPU-meter application in the task-bar and if I see that the CPU-time is extensivly used after the application has been put to background, then I might use a taskkiller to stop the bad application. But that scenario is rare... I usually get 50h+ of battery time per charge, whatever I do with it.
Regards // OwL

Related

About Memory Leaking

Recently I found something interesting and would like to share here see any Hi-Tech people can make a software to fix the memory leaking in WM OS.
When I first start my machine, my Ram is about 25.5mb and then will drop down to around 24 something mb. I used different software to try to recover as much as RAM including Oxios and eLiAs AutoHibernate.
Recently I start to use Vito GoodWin I found that every time when I use the dialer pad no matter I make or not make a phone call, my Ram will drop down a bit. When I open the GoodWin, I can see the "Phone" is still running. After I close the "Phone" in GoodWin and close GoodWin and back to Today destop. I found that my Ram will go up to 26.6mb. How come? Is it any chance to find out why and may someone can make a software Like Oxios but can take more Ram back.
Hope someone can do it for US. Cheers
memory leakage
hey dude this is not memory leakage actually whenever u run anything on the pocketpc or a cell phone or a computer it uses the resources of the device that is it uses the RAM memory(memory used for running the programs on a computer,pocketpc).
And as it is all the programs,codes,scripts are actually lines and machine codes which get compiled and executed and hence they use the memory of the device to run and hence the RAM memory is used.
For example if u run multiple programs at a time then it drains your RAM memory and hence the result is slow processing of your device hence there is no such way that you can avoid the RAM usage so even when u start your dialer it consumes the RAM do not worry about the RAM usage its normal.
And about the programs you mentioned they are just to shift the memory usage and yet when you start your dialer the specified and required amount of RAM will be used.
To make it more clear for u just go to the task manager of your computer (by pressing alt+ctrl+del all together) and then click on the performance tab
now minimize the task manager and just open a folder or any program and check your task manager the RAM usage might have definitely increased..
Its the same funda with your pocketpc and mobile phones..
its called...ram...basic computing...just like any computer..its shortterm memory used to run programs...the more u open the less u have...maybe u should search up basic computing terms like ram for a further explanation
Memory leaking is real and especially noticeable on windows mobile.
What happens is that memory is allocated for use by programs but then not released when the application is finished doing its job. A combination of complexity and lazy programming is often the cause.
The end result is a gradual drop in available memory, regardless of whether you have any applications still open. The only way to make that memory available is a soft-reset.
Suggest you look carefully at which applications leak the most and avoid them. It can be one or two culprits that you can live without.
My phone (Verizon SMT5800, running Windows Mobile 6 Standard) is bad about memory leaks. I have to reboot it at least once a day to recover memory, sometimes several times in one day. On one occasion, it got down to about 2 MB free and wouldn't even run the reset command. I had to reset it by taking the battery out.
See here and tweak if necessary !! http://msdn.microsoft.com/en-us/library/ms911907.aspx
"soft reset a day keeps the memory hog away"
ayyu3m said:
"soft reset a day keeps the memory hog away"
Click to expand...
Click to collapse
^ Thats the only thing that works for me
autohibernate works really well
SKTools FreeUP RAM
SKTools FreeUP Ram works well. Use it a couple times a day. Eventually have to soft reset though, maybe every couple of days. Have to buy it of course, not free. But it prolongs the duration between soft resets.
The newest SKTools has an additional service for automatic FreeUP Ram, after every app-closing. Just try it
Is there a way to find out which application is causing the memory leak?
I don't think, that there is a real memory leak.
For example Windows Mobile has a file cache which is not filled yet after a fresh softreset. While you use your device this gets filled until the required amount of memory is being used for it.
If more and more memory is consumed each time the dialpad is used, as described, then there is a memory leak. Nothing else can explain that. You should check with your rom chief.
Thanks, works great!
LordDeath said:
The newest SKTools has an additional service for automatic FreeUP Ram, after every app-closing. Just try it
Click to expand...
Click to collapse
I just upgraded my version of SKTools to get the latest FreeUP RAM Service feature. Very nice. Automatically frees unused RAM.
Thanks for the hint.
chigz said:
hey dude this is not memory leakage actually whenever u run anything on the pocketpc or a cell phone or a computer it uses the resources of the device that is it uses the RAM memory(memory used for running the programs on a computer,pocketpc).
And as it is all the programs,codes,scripts are actually lines and machine codes which get compiled and executed and hence they use the memory of the device to run and hence the RAM memory is used.
For example if u run multiple programs at a time then it drains your RAM memory and hence the result is slow processing of your device hence there is no such way that you can avoid the RAM usage so even when u start your dialer it consumes the RAM do not worry about the RAM usage its normal.
And about the programs you mentioned they are just to shift the memory usage and yet when you start your dialer the specified and required amount of RAM will be used.
To make it more clear for u just go to the task manager of your computer (by pressing alt+ctrl+del all together) and then click on the performance tab
now minimize the task manager and just open a folder or any program and check your task manager the RAM usage might have definitely increased..
Its the same funda with your pocketpc and mobile phones..
Click to expand...
Click to collapse
Thanks for the detail reply. Actually what I want to say is after I turn the phone on the ram is start dropping. I just take a sample like after you use the phone the ram would drop about a mb. Of course we know that it is not leaking. My point is after I closed the software and use some software to recover the RAM like Oxios. You can get some RAM back, but my case is when I after make a phone call and turn the dialer pad off. I wouldn't see any software running at task manager also if I use Oxios I just claim about half to one MB RAM back. When I turn GoodWin on in this point I can see the "Phone" still running at GoodWin. I stop the "Phone" at GoodWin and than turn GoodWin off, I found that I could recover 2 - 3mb RAM. That's mean for me is when GoodWin turn this software "Phone" off and could claim more RAM back than Oxios. So could we use the way GoodWin do to make a software claim more RAM back? If you don't get what I say, just try to download GoodWin from the net and try to play around than you can see what happen. Sometime it even make me have more RAM than just after softreset.
ayyu3m said:
"soft reset a day keeps the memory hog away"
Click to expand...
Click to collapse
Are you in NZ? Me too, which city you are? I am in Christchurch.

Lack of available memory

I have had my X10 for about 2 weeks now and im finding that, even though i havent got many apps on the phone, advanced task killer is reporting only 30-40mb of memory available. Does anyone know why this is happening? When i first got the phone it was reporting 100+mb memory for about a week.
Android = Linux
Linux = http://www.linuxhowtos.org/System/Linux%20Memory%20Management.htm
The reason Linux uses so much memory for disk cache is because the RAM is wasted if it isn't used. Keeping the cache means that if something needs the same data again, there's a good chance it will still be in the cache in memory. Fetching the information from there is around 1,000 times quicker than getting it from the hard disk.
Click to expand...
Click to collapse
Do you use the advanced view of advanced task killer?
Maybe there are several system tasks running, that eat lots of memory.
i've found that since changing to RIFA016, I have slightly less available memory. (around 30MB if I remember right)
@VMaxxor: I get that i uses some of the RAM for disk caching but i had the same number of apps one week ago and i had 110ish MB of available memory. i dont how it could have cached more things.
@McKebapp: I did just enable the advanced view. the system process seem to be taking up about 100mb of memory but i hav no idea where the other 70ish mb is going.
@Niceties: What is RIFA0106?
R1FA016 is the latest build version available at the moment (correct me if I'm wrong here!)
You might have to debrand your phone to get it! (theres a thread on how to do this in this forum)
As mentioned earlier, Linux is very good at memory management and works on the principle that if memory is there and not being used for anything then it might as well fill it up with something. When you start a new app the Linux kernel organises the memory chunk it needs.
I don't use task killers, they don't really offer any benefits in a Linux based system, unlike Windows which has always been abysmal in doing this.
(BTW - The HTC keyboard rocks !!! I typed all of this fast and with the minimum of errors and corrections)
Sent from my X10i using the XDA mobile application powered by Tapatalk
savjanivv said:
@McKebapp: I did just enable the advanced view. the system process seem to be taking up about 100mb of memory but i hav no idea where the other 70ish mb is going.
Click to expand...
Click to collapse
I've also realized something strange.
After restarting the Phone, I've got around 154MBs of free Memory.
I use the Pro Version of the Advanced Task Killer, that flushs the phone Memory when one locks the screen.
4-5 Days later with normal use, the Phone begins to slow down.
Then, I've just 40MBs of free Memory but no task is open.
I guess this happenes by the Linux Memory Management cashaw mentioned earlyer.
But the Phone is slow as hell.
After restarting it again --> Voilá >150MBs and the Phone is back at normal speed...
problem
this same thing happens to me....turn the phone off and it shoots right back up to 150mb or similar but after awhile it returns to 40 with no apps running and is leaving the phone really slow.
McKebapp said:
I've also realized something strange.
After restarting the Phone, I've got around 154MBs of free Memory.
I use the Pro Version of the Advanced Task Killer, that flushs the phone Memory when one locks the screen.
4-5 Days later with normal use, the Phone begins to slow down.
Then, I've just 40MBs of free Memory but no task is open.
I guess this happenes by the Linux Memory Management cashaw mentioned earlyer.
But the Phone is slow as hell.
After restarting it again --> Voilá >150MBs and the Phone is back at normal speed...
Click to expand...
Click to collapse
i once saw 201 mb free memory....
but soon it reduces to 130-140.
it stays there for me for as long as 2-3 days..
i just set my app killer to be slightly more aggressive and it seems to have done the trick.... sticks around 190 available now!

Available Memory, how much do you typically have?

Good day!
I've tried a few different apps now, Memory Usage, Advanced Task Killer, and I seem to hover between 110m to 25m. I kill some apps and it jumps back up to 110 and then slowly works its way back down to the mid 20's. Is this normal?
Tips? What is your available memory like?
To sum it up: Free memory is useless memory. You should have as little memory free as possible.
Explanation. Android handles memory management really well. When an app is opened and needs more memory it will shut down unused processes and free up memory on an as needed basis. For apps this can be everything from pausing individual functions all the way to saving an apps state to disk and restoring it the next time it's opened.
Task killers are mostly solutions looking for a problem, I've been running without one for months and my amount of free memory fluctuates as expected when surfing the web and things like that but so far there haven't been any times where I've had to free up memory. So don't stare yourself blind on memory meters and try freeing up memory. Android handles that well enough on its own.
+1..
The message you have entered is too short. Please lengthen your message to at least 10 characters.
That's good info! I kinda knew I was making something out of nothing with the numbers. The phone has been fine in terms of performance.
my 2 cents....i typically have between 30-60mb free. phone does not lag or anything. i used task-killer for a few days when i got phone, then actually thought about what it was doing and the way the system (linux based) is designed. i ditched it and have not looked back!
ps. my phone is rooted R2BA024 firmware, fwiw.
I usually have like 80 mb free ram just for the case and i use task manager to kill apps that are using data connection when i dont need them
I got totally obsessed with task killing but having read a lot of the lads reports on here I am on my third day of not touching it and I have to say my phone is doing fine all by itself!
goth50 said:
I usually have like 80 mb free ram just for the case and i use task manager to kill apps that are using data connection when i dont need them
Click to expand...
Click to collapse
I think you'd be better off setting up data synchronisation properly. I'm assuming you're talking about background syncing of course. So that you don't accidentally kill an app in the middle of a sync which might cause corruptions. I've had that happen when synching my gmail to a linux machine and the network went down, the cleanup required was insane and I lost a whole months worth of mails from the google servers.
ddewbofh said:
To sum it up: Free memory is useless memory. You should have as little memory free as possible.
Explanation. Android handles memory management really well. When an app is opened and needs more memory it will shut down unused processes and free up memory on an as needed basis. For apps this can be everything from pausing individual functions all the way to saving an apps state to disk and restoring it the next time it's opened.
Task killers are mostly solutions looking for a problem, I've been running without one for months and my amount of free memory fluctuates as expected when surfing the web and things like that but so far there haven't been any times where I've had to free up memory. So don't stare yourself blind on memory meters and try freeing up memory. Android handles that well enough on its own.
Click to expand...
Click to collapse
Heh...handles memory very well, but how about the battery life!? The more apps you have- the less power you've left.
mymagicmyhero said:
Heh...handles memory very well, but how about the battery life!? The more apps you have- the less power you've left.
Click to expand...
Click to collapse
That's debatable, most background apps drain miniscule amounts of power. The exception naturally being things that makes use of the hardware while backgrounded by playing music, syncing, calculating pi or things like that. Most apps though, just hang out in memory not really doing anything. A lot of the time, if not most, it's more efficient staying there as opposed to shutting it down and starting it up again later.
+1 yes, just hanging out idle in memory wont cost you any battery, the memory will be on an base current either way, what does cost you battery is the read and write actions to memory so if you frantically clean out that memory your phone will have to write alot more to it working with your different apps resulting in a slower (less prepared) device sucking more battery then neccessary. Leave the memory handling to your device ;-)
Sent from my X10i using XDA App

are task killers a good idea?

I have been using advanced task killer free for a few days and have not noticed any difference in battery life. Shall i keep or uninstall?
same here, but its not bad, and its kill some appz and spece memory - so way not ?
google states that Android Users do not need to use task killers. Programs are left in memory for latter use, the system will even load programd you haven't used yet if the system thinks you might use it. These programs stored in memory use very little power and might actually use more because the program has to reload every time its used. I used task killers for a little. But now i don't.
Sent from Conical .07
Android doesn't need task killers really, if memory gets low then Android will close apps to free up memory, I find that if an app is using to much memory though...like a bad app the task killer is useful ..
To find out if an app is leaking memory you can donwload Watchtower for free to take a look whats going on..
I wouldn't uninstall it, just no need to use it so often..Android usually looks after itself..most of the time.
Task killers are actually a very bad idea. Many apps are making use of a background services, killing them as well (what most blind killers do) will result in a totally unpredictable behavior.
As a developer I really hate them. I have one app which totally depends on a background service. I get sometimes really weird error reports... questioning a little further always reveils that taskkillers have blown away the back-end of this app.
Task killers are stupid. Android has a linux base. The linux way is to cache a bunch of data into memory to allow apps to start and run faster.
How much free memory you are showing is actually meaningless because should an app require more memory the kernel will reallocate memory to the active task, automatically stripping it from idle tasks.
If you are trying to save power what its relevant is which apps are using cpu cycles. As fat as I know the only task killer type app which monitors cpu usage instead of memory usage is Watchdog.
Sent from my Desire HD using Tapatalk

Android / Linux Memory Management

Hi guys,
I find myself, yet again, having to explain to users how linux and android manages ram.
Most users seem to think that more free ram is better. They couldn't be more wrong.
This article explains the concept in layman's terms so nobody should be confused or left doubting.
So there we go, I'll refer to this article and I hope you all do too if you see stupid remarks here in the forum regarding free ram.
Have fun reading
Quote
Linux memory consumption concept
Linux memory consumption concept is all about efficiency. The system’s RAM is a resource that is meant to be used; 100% of it (if possible), all the time (if possible).
Linux utilizes unused RAM to cache data and filesystem meta-data from slower storage devices (Flash or disk) because fetching the information from the RAM is much quicker: There are no bottlenecks such as slow physical media, slow buses or device clocks, and not decompression is required.
Assuming there are no memory leaks, the reason that memory report tools report low amount of free memory is because the RAM is considered to be wasted if it isn’t used. This concept may require some time to digest, because conventional thinking may lead to the conclusion that an efficient system is a system with a lot of free memory. This is not entirely correct. In Linux case, the kernel tries to utilize the most of the RAM to improve the system performance. Keeping the cache means that if the kernel or a task needs the same data again, there’s a good chance it will still be in the fast cache in memory.
Conclusion: less free ram = more cached process/application = better multitasking.
Some heavyweight app need lot of free memory, but in the daily usage better if you NOT use s*perch*rger or any similar script to get more free ram.
A typical bug with systems what have lot of free ram: when a call arrive, you need to wait several seconds to see the caller name, because the contacts app killed to get more free ram, and need to reload the app, open the contacts database, etc...
Sent from my E15i using xda app-developers app
pilu1978 said:
Conclusion: less free ram = more cached process/application = better multitasking.
Some heavyweight app need lot of free memory, but in the daily usage better if you NOT use s*perch*rger or any similar script to get more free ram.
A typical bug with systems what have lot of free ram: when a call arrive, you need to wait several seconds to see the caller name, because the contacts app killed to get more free ram, and need to reload the app, open the contacts database, etc...
Sent from my E15i using xda app-developers app
Click to expand...
Click to collapse
i have a lot of free ram and still doesn't have any problem with call delay or any other problem, I don't even use any ram script or any other script ,so in my rom I can enjoy when I use heavyweight app's or when I use a daily APPs
All this information is an overkill for the original discussion and it actually misses the most important point. Here's why.
The number reported by most users as free RAM is not free at all. When most users refer to the amount of free ram in a particular ROM, they're refering to the number reported in Running Apps. That memory is not free memory. And that's the most important point.
You don't read guys reporting the amount of free RAM memory while executing the free command in terminal.
It's true that the "running apps" doesn't report the true amount of free ram..
Terminal Emulator - type su then type free . I think that is the true amount of ram.
Sent from my Nexus 7 while being Paranoid .
Mockingbird said:
Terminal Emulator - type su then type free . I think that is the true amount of ram.
Sent from my Nexus 7 while being Paranoid .
Click to expand...
Click to collapse
Yeah that's right to a certain point since android grabs as much ram as it can.. Doesn't mean the remaining ram is all that's free though..
Quote
Memory management
Since Android devices are usually battery-powered, Android is designed to manage memory (RAM) to keep power consumption at a minimum, in contrast to desktop operating systems which generally assume they are connected to unlimited mains electricity. When an Android app is no longer in use, the system will automatically suspend it in memory - while the app is still technically "open," suspended apps consume no resources (e.g. battery power or processing power) and sit idly in the background until needed again. This has the dual benefit of increasing the general responsiveness of Android devices, since apps don't need to be closed and reopened from scratch each time, but also ensuring background apps don't waste power needlessly.
Android manages the apps stored in memory automatically: when memory is low, the system will begin killing apps and processes that have been inactive for a while, in reverse order since they were last used (i.e. oldest first). This process is designed to be invisible to the user, such that users do not need to manage memory or the killing of apps themselves.] However, confusion over Android memory management has resulted in third-party task killers becoming popular on the Google Play store; these third-party task killers are generally regarded as doing more harm than good.
CtrlAltDelIrl said:
Memory management
Since Android devices are usually battery-powered, Android is designed to manage memory (RAM) to keep power consumption at a minimum, in contrast to desktop operating systems which generally assume they are connected to unlimited mains electricity. When an Android app is no longer in use, the system will automatically suspend it in memory - while the app is still technically "open," suspended apps consume no resources (e.g. battery power or processing power) and sit idly in the background until needed again. This has the dual benefit of increasing the general responsiveness of Android devices, since apps don't need to be closed and reopened from scratch each time, but also ensuring background apps don't waste power needlessly.
Android manages the apps stored in memory automatically: when memory is low, the system will begin killing apps and processes that have been inactive for a while, in reverse order since they were last used (i.e. oldest first). This process is designed to be invisible to the user, such that users do not need to manage memory or the killing of apps themselves.] However, confusion over Android memory management has resulted in third-party task killers becoming popular on the Google Play store; these third-party task killers are generally regarded as doing more harm than good.
Click to expand...
Click to collapse
Certenly you explain the subject very good. It is my first time to understood. Thanks!
mikekgr said:
Certenly you explain the subject very good. It is my first time to understood. Thanks!
Click to expand...
Click to collapse
Certainly you didn't care enough about the subject before. Otherwise you would have found the same information in Wikipedia: http://en.wikipedia.org/wiki/Android_(operating_system)#Memory_management .
Unless CtrlAltDelIrl edited that article...
Fortun said:
Certainly you didn't care enough about the subject before. Otherwise you would have found the same information in Wikipedia: http://en.wikipedia.org/wiki/Android_(operating_system)#Memory_management .
Unless CtrlAltDelIrl edited that article...
Click to expand...
Click to collapse
Always these days the same problem: all information exist somewwhere but it is not very easy to "locate" the information required!

Categories

Resources