{Help} Pinpointing a memory leak - Touch HD General

Hi all,
i have read all i can find on the forum on this topic and i wanted to ask is a specific procedure existed for determining a memory leak (if i have one!) i find the gwes.exe file starts at 12mb at boot and generally increases untill a soft reset. it can reach 18mb. whilst i am not sure if this effects performance it causes my memory usage to rise constantly for no reason i can determine!
my setup - rom miri wm6.5 v26.3 - premium WITHOUT manilla
interface - spb mobile shell
dialer - phone ex
not much else
any ideas hints kindly recieved!
regards
Mat

lemat1 said:
i have read all i can find on the forum on this topic and i wanted to ask is a specific procedure existed for determining a memory leak (if i have one!) i find the gwes.exe file starts at 12mb at boot and generally increases untill a soft reset. it can reach 18mb. whilst i am not sure if this effects performance it causes my memory usage to rise constantly for no reason i can determine!
Click to expand...
Click to collapse
GWES memory consumption growth is as natural as gravity and it happens to improve performance. This happens because it is smart enough to keep resources in fast RAM so that next time they will not be loaded from (comparatively slow) flash memory. Basically this is the point in having RAM and the reason why you paid for it - it has to be loaded with stuff to make things faster. This sport of freeing RAM is just ridiculous in most cases (although not always, of course). You pay for it and then don't use.
Secondly, what you describe is not a memory leak. A memory leak is a situation of uncontrolled memory usage growth (if your GWES gradually ate all available memory to a point where device would crash that would be a memory leak). In general, there's nothing wrong with applications consuming more and more RAM as they work as long as they can free this RAM on demand. See for yourself: on your PC, load a memory-hungry application such as a web browser, note how much RAM it uses initially. Then use it for a while, RAM consumption will grow. Then minimize it and see how RAM usage drops dramatically. Even if an application uses half of all RAM it doesn't mean that this RAM isn't available for other programs when needed. When it's not needed, why not use it?

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.

Does using high RAM have effect on speed?

Since the new official WM6.5 is using a lot of RAM, does this affect the speed of the device?
Or does it merely mean that there can't be as many apps open until it reaches critical level?
Not directly, it should not. Only if it reaches a certain level, as you said.
It's likely however that WM6.5 uses more processing power than 6.1, but I can't say for sure.
It should not affect the performance, I have been up to 80% or more and never experienced any lag issues.
Cool thanks for the replies
One of the biggest misconceptions about RAM on Windows Mobile or indeed most operating systems, is that it's a good thing to have lots of free ram available. It's not. It's a complete waste of resources. The most efficient use of RAM would be bouncing off 100% used as much as possible.
It's good to have free RAM up until you have nothing more to execute. Having more RAM ensures you never reach this limit and start swapping.
I may not use all 4GB on my PC at once, but when the next version of XXXXX game comes out, I may end up using more than I do now. The overhead ensures I don't have to go out and buy more memory to ensure reliable performance.
A little off topic, but seems like a good place to ask: Opera (using 6.1, original or TESS) often struggles rendering complex (and sometimes even simple) pages. When you scroll to a new part of the page there are delays while it redraws the new bits. When you scroll back, it has to redraw the original bits. There are annoying delays and large ugly grey areas while it does this. I often have 3-4 tabs open BTW.
The question is, can Opera be allocated more memory (since I have plenty, especially since TESS) or is it completely automatic under WM? I've poked around in the registry and there are a couple of keys for "memory allocation" and "heap allocation", or some such, under the Opera section, but they're just numbers, they don't look like Mbytes, if you see what I mean.
The slow redrawing thing feels like a memory problem, as though it's redrawing from storage cache rather than quicker RAM cache, that's why I ask.
ArtieQ said:
It should not affect the performance, I have been up to 80% or more and never experienced any lag issues.
Click to expand...
Click to collapse
I fully agree with you.
The only problem is that programs that use lots of memory will not start. In fact I can play with Xtrakt only if I disable manila, otherwise the system not have enough memory to start it.
Sorry for the bad English
im sorry but if your PC or phone whatever you like is using alot of RAM, say %90, then this is going to cause the device to slow down.
once you reach a certain limit of RAM left, it has to start using disk space as temporary RAM and as such everything becomes slower.
RAM makes it quicker ONLY when the program you want is loaded into the RAM. So in windows if you have alot of programs running in the task area, then yes these programs will run up very quickly. But try then to open up another program when your memory is briming and you will find that it will slow it up.
To have memory running at a high percentage used is bad practise. In theory its good because it means things are loaded, but its only the things that are loaded that notice the speed benifits. There needs to be a cut off point.
adamrob69 said:
im sorry but if your PC or phone whatever you like is using alot of RAM, say %90, then this is going to cause the device to slow down.
once you reach a certain limit of RAM left, it has to start using disk space as temporary RAM and as such everything becomes slower.
RAM makes it quicker ONLY when the program you want is loaded into the RAM. So in windows if you have alot of programs running in the task area, then yes these programs will run up very quickly. But try then to open up another program when your memory is briming and you will find that it will slow it up.
To have memory running at a high percentage used is bad practise. In theory its good because it means things are loaded, but its only the things that are loaded that notice the speed benifits. There needs to be a cut off point.
Click to expand...
Click to collapse
Your understanding of the OS and therefore your conclusions are wrong. Desktop Windows is a different beast to Windows Mobile. When physical RAM gets low in Windows, it swaps data out to the disk. In WM it doesn't, it asks programs to close down (then forces them if none of them do), on a least recently used basis. For this reason, in WM, you might as well have applications using free RAM since they're effectively 'cached' and ready to be called up quickly. Should you start another process that requires that RAM, then the old processes will be closed very quickly. In WM, free RAM is wasted RAM.
Hi
For this reason, in WM, you might as well have applications using free RAM since they're effectively 'cached' and ready to be called up quickly. Should you start another process that requires that RAM, then the old processes will be closed very quickly. In WM, free RAM is wasted RAM.
Click to expand...
Click to collapse
Exactly Which is why having the HTC task bar shut down applications on clicking the cross is a complete waste of time. Windows Mobile is designed to leave applications loaded even when you close them, that way they are ready immediately when you want them again. This saves times and also power.
As already stated Windows Mobile will close applications automatically if required to free up some space.
Empty RAM is a complete waste, and is an argument against increasing RAM in Windows Mobile devices to silly headline amounts as even in standby that RAM has to be kept powered even if not being used.
Regards
Phil

Android 1.6 vs 2.x memory footprint

Hello.
Right now I am on Cyanogen 4.2.15.1.
The biggest problem of G1 is imho lack of memory. I did every possible hack to make more memory available to my phone. I use compcache, 10mb hack etc..
I also tried swap, but it has been giving me some troubles and I find my phone working better without it.
I see everybody switching to 2.x roms and of course it makes me want to switch too although my phone runs pretty fine as it is now. But I would switch if I am convinced that things will improve. So here come the questions:
Did you experienced speed improvement by switching or it just runs the same/slower? (I am only interested in answers of G1 users as this is somehow a bit specific phone with the lack of memory)
My second question rose from my concerns of memory too. To use 2.x roms, one has to use DangerSPL, right? I am not sure about this, but I got the impression, that this one moves some of the memory from application runtime to rom space, so we can fit larger roms in. Does that mean, that in the end this rom has less operational memory for itself? Because that would be the exact opposite thing to what I want to do.
Thanks for the answers.
You as many others are confusing persistent storage with ram.
Ram is fast but will not store data over a reboot.. the amount of ram on the dream remains the same regardless of the spl/radio/rom (with maybe an exception of the 10mb hack that borrows 8mb from video ram for general use)
The persistent storage slow and is what danger spl changes.. this is the equivalent of your hard drive on a computer.
In the case of danger spl it significantly reduces the temporary space (cache) and increases both the core system storage (system) and the user space storage (data) this allows more on internal phone storage instead of the sdcard, having your core apps not using apps2sd is likely to increase perceived speed.
Since the memory (ram) is unchanged and the new kernels are better at memory management there is potential for newer versions to support more tasks at the same time than the older versions. (We are not there yet but cm-5.0.8-test4 and cm-4.2.15.1 seem similar in behavior in terms of what can be done with the ram avalible)
As for upgrading that's your choice.. in general on the dream anyway I don't recommend going to cm5.0.7 and related roms if you have not already done so.. and I never recommend a test version if you are not looking to be a tester. So I'd wait till cm5.0.8 final and related roms are pushed if you feel it's time to upgrade.
Otherwise if you are on a stable 1.6 rom that fills your needs and want to keep a very stable phone.. there is no need to rush the upgrade.. at some point you will find something that requires you to upgrade to 2.1 and will be glad it exists as it will improve the usefulness of the phone.. and I'm sure the stability of 2.1 will only improve over time.
Thank you for your answer.
I of course understand the difference between ram and persistent storage (rom?). The information I missed is that the additional memory is taken from the cache. Someone somwhere here posted something that implied that it reduces ram. Hackery!
Thank you for clearing that up. What are consequences of having less cache? Is this not a problem then?
You got my point with stable 1.6. I do not want to flash new rom every week and prefer stable working phone. The ONLY thing I was hoping for is the better memory management and maybe the whole rom footprint in ram, leaving more room for apps instead of system. I am running apps2sd but I think the main source of sluggishness of my phone is that apps are too often removed from ram by dalvik.
So I was hoping for something like " Yep, 2.1 is 50mb in ram instead of 80mb of 1.6 and you will have more free memory." That would make me switch. Having the same amount or even less makes no sense for me. I see no killer 2.x feature that I need to have so far.
Same amount of ram with both spls as I said. No 10mb hack on cm5 because the gpu is used for system operations
Cache is mounted as /cache and as I said contains temporary and cached data.. As designed its intended as a staging area, which will usually persist across reboots but may not under certain situations.
No performance impact ought to exist due to the resize. If too many things are attempted to be saved here you will get out of disk space errors.. but 30mb is plenty for the staging operations required by the system during normal operation.
As you may know: Linux never has "free" memory.. but reclaimable memory.. the reason for thus is anything read from persistent media is put into "disk cache" in case its needed again.. if the memory is needed for something else it will be freed at no/little cost, but if the cached files are needed they wont be reloaded thus saving the time reading disks/SD/flash.
(Thus why devs cringe when people show the output of free.. 'cat /proc/meminfo' will give full detailed breakdown of memory use if you qknow how to read it)
I am Linux guy myself, so I know how it manages the memory. Anyway, 10mb hack was a huge thing for me, can not live without it.
That pretty much means I am staying and 1.6, thank you for your time.

[Q] Memory Management (Appkiller)

Hello,
Even though I am on Android 2.2 I am not satisfied by the way it handles memory allocation and management. Applications and processes I used 2-3 days ago are still there and taking precious space.
Are Appkiller applications recommended ? If yes then which one should I get.
I am a bit cautious because I have read about appkillers that on Froyo they are detrimental to the way the OS works and slows it down even more.
Any other tips and settings how I can make my phone have a lot more free memory and free space faster ?
Cheers,
MJ
mjehan said:
Hello,
Even though I am on Android 2.2 I am not satisfied by the way it handles memory allocation and management. Applications and processes I used 2-3 days ago are still there and taking precious space.
Are Appkiller applications recommended ? If yes then which one should I get.
I am a bit cautious because I have read about appkillers that on Froyo they are detrimental to the way the OS works and slows it down even more.
Click to expand...
Click to collapse
No, appkillers will cause you problems, Android is actually quite good with it's memory management and all appkillers tend to do is kill off apps which the system then restarts for further info please Read, IMO I can't believe that you are running short of memory on your DHD unless you've a huge number of background tasks running
I also used a taskkiller on my DHD for some time until i figured out that it eats up the battery. (~10% / hour). I removed it and it was all good.
I think 2.2 does quite a good job in memory handling and there is no auto killing of applications necessary, except if a application freezes up and won't close or something like that.

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