Cache: Relationship administrated/adjusted - memoryleak - Windows Mobile Development and Hacking General

Since some months I'm wondering whats better:
1.) To let WM administrate the file system filter/fatfs/glyph cache size or to
2.) Use one of the tweak tools to set a specific value.
I think if WM is administrating this caches the free ram will go down and down and down, apparently WM is not able to free the ram, the result is a memory leak.
If a specific value is set it will cost some ram, but its faster and the amount of free is more or less stable. After some hours of using the device the memory leak also shows up, but in my opinion its not as bad as if WM is administrating it.
Is this memoryleak in WM devices caused by this caches or is there another reason for it?

Related

Adjusting storage memory and program memory

Hi, is there a way to adjust the memory usage for the program, like adjust the storage and give it to program. Not like xda, the prophet does have a slider for the memory but could not be adjusted. Is there anyway how to go over this ?
Prophet, as well as many new WM5 devices have (physically) separate program and storage memories. And thus there is no built in way to adjust the amounts of the two.
The Prophet has a 64MB Ram and a 128MB Flash Size with a storage size of 42.55. Where did the 44.01 MB program came from? Is there a way to increase the MB size for the program? Because I believe that even though you can install several program using the storage, a portion of the program memory gets filled up until at the critical level, which will later play an important part once you start running a program which needs a higher memory. Any remedy to this?
The 64MB RAM is what I think should be called 'box figure'. It's what's printed on the box.
In reality you get 50+ actual RAM at leas 10 of which go to various OS functions and the rest is left for running programs to use.
Under WM5 non of it is used for files, but when you run programs, even built-in ones there are sometimes memory leaks which means that even though you closed the program some of the memory (sometimes more them 1MB) remains occupied.
The only known way to fully reclaim memory is to soft reset the device. I do it on my Jamin once a week when I am left with 12-10MB free.
Unfortunately, there is no way to add RAM to device.

{Help} Pinpointing a memory leak

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?

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

[LEO] HTC HD2 576MB Ram not what is seems

Hi,
I've been using a cooked ROM with the 576MB RAM enabled. Clearly the total available memory increases 457.4MB.
The concerning thing is when I begin to test the memory. Presumably this extra memory means more applications can run simultaneously. However when i open multiple applications the OS will automatically close applications to conserve memory even when it has not reached the 457.4MB limit.
In previous ROMS I recall the memory would go upto about 290MB - 300MB before applications would automatically close to conserve memory. However with the extra RAM there is no change in this behaviour.
Another issue I have noticed, is when the memory reaches over 330MB, this then stops applications like YouTube and HTC Album from running (this NEVER happens on the roms without 576MB enabled). Clearly there is atleast 100MB more memory available which the HTC HD2 is not making full use of.
Can I please have your views and whether or not the 576MB is actually beneficial and not just a way of stopping other apps running when memory usage is high. Although I believe the extra memory is available, i'm not convinced certain applications can handle it correctly.
I'm using the Energy ROM with Radio 2.08, which gives you 576MB memory. I have no issues with programs losing, I have 7-8 programs open at once. Also I have noticed a noticeable speed increase with the extra RAM unlocked, and of course with the new ROM.
Abolisher2407 said:
Hi,
I've been using a cooked ROM with the 576MB RAM enabled. Clearly the total available memory increases 457.4MB.
The concerning thing is when I begin to test the memory. Presumably this extra memory means more applications can run simultaneously. However when i open multiple applications the OS will automatically close applications to conserve memory even when it has not reached the 457.4MB limit.
In previous ROMS I recall the memory would go upto about 290MB - 300MB before applications would automatically close to conserve memory. However with the extra RAM there is no change in this behaviour.
Another issue I have noticed, is when the memory reaches over 330MB, this then stops applications like YouTube and HTC Album from running (this NEVER happens on the roms without 576MB enabled). Clearly there is atleast 100MB more memory available which the HTC HD2 is not making full use of.
Can I please have your views and whether or not the 576MB is actually beneficial and not just a way of stopping other apps running when memory usage is high. Although I believe the extra memory is available, i'm not convinced certain applications can handle it correctly.
Click to expand...
Click to collapse
people want to believe in the 576 mb ram trick
truth hurts
After doing some research I have found out the following information :-
Windows Mobile 6.x is powered by Windows CE 5.2.
http://www.slideshare.net/abhisheksharma/windows-mobile-6
http://www.addlogic.se/articles/articles/windows-ce-6-memory-architecture.html
The memory architecture is divided in to 32 process slots. Each with a capacity of 32MB. However with a little testing of my own I have found that it is not possible to run more than approximately 11 applications similtaneously which equates to 28 processes running on my setup. The remaining (28 - 11) 17 processes are operating system specific processes such as the GWES.exe DLL's etc.
If you calculate the memory required for the max of 11 applications it is 352MB which explains why I never see the memory go above 300-330.
The advantage of having the extra memory (576MB) is possibly to allow the other 21 processes to run with more head room.
Abolisher, to test if the 576Mb Ram trick works, you can make the following test.
Create a 128Mo Ram disk, fill up this new storage with data (internet cache for example) and run agin your tests, you'll see that you could fill all your ram and your data on the storage will be OK.
Some tests were done to prove that the 576Mb trick was real.
Abolisher2407 said:
After doing some research I have found out the following information :-
Windows Mobile 6.x is powered by Windows CE 5.2.
http://www.slideshare.net/abhisheksharma/windows-mobile-6
http://www.addlogic.se/articles/articles/windows-ce-6-memory-architecture.html
The memory architecture is divided in to 32 process slots. Each with a capacity of 32MB. However with a little testing of my own I have found that it is not possible to run more than approximately 11 applications similtaneously which equates to 28 processes running on my setup. The remaining (28 - 11) 17 processes are operating system specific processes such as the GWES.exe DLL's etc.
If you calculate the memory required for the max of 11 applications it is 352MB which explains why I never see the memory go above 300-330.
The advantage of having the extra memory (576MB) is possibly to allow the other 21 processes to run with more head room.
Click to expand...
Click to collapse
Actually it is even more complicated with even more limitations. This article series gives you more insight into memory subsystem in WM/WM:
http://blogs.msdn.com/hegenderfer/archive/2007/08/31/slaying-the-virtual-memory-monster.aspx
pen-pen said:
Abolisher, to test if the 576Mb Ram trick works, you can make the following test.
Create a 128Mo Ram disk, fill up this new storage with data (internet cache for example) and run agin your tests, you'll see that you could fill all your ram and your data on the storage will be OK.
Some tests were done to prove that the 576Mb trick was real.
Click to expand...
Click to collapse
Does the 128MB ramdisk work? It's been told it fails above 32MB.
Some tests were done to prove that the 576Mb trick was real.
Click to expand...
Click to collapse
Well, it's real. But absolutely useless unless any real life working scenario is found.
576MB does increase performance.
djet said:
Does the 128MB ramdisk work? It's been told it fails above 32MB.
Click to expand...
Click to collapse
there is more than one ramdisk driver floating about,with different max sizes, go look in the non phone specific win mo sections.
djet said:
Well, it's real. But absolutely useless unless any real life working scenario is found.
Click to expand...
Click to collapse
well, if no real life scenorio is found for 576MB, then what is the purpose for 1024MB in TMOUS version?
chrisukhd2 said:
576MB does increase performance.
Click to expand...
Click to collapse
Hoax. Go get "1GHz hack".
noris08 said:
well, if no real life scenorio is found for 576MB, then what is the purpose for 1024MB in TMOUS version?
Click to expand...
Click to collapse
Answering this question equals finding this scenario.
djet said:
Hoax. Go get "1GHz hack".
Click to expand...
Click to collapse
The 1Ghz Hack is an hoax.
The "1Ghz driver" was the exact same file as the original one.
djet said:
noris08 said:
well, if no real life scenorio is found for 576MB, then what is the purpose for 1024MB in TMOUS version?
Click to expand...
Click to collapse
Answering this question equals finding this scenario.
Click to expand...
Click to collapse
Well, the TMOUS have 576Mb of RAM and 1024Mb of ROM, RAM and ROM are two different things.
pen-pen said:
The 1Ghz Hack is an hoax.
The "1Ghz driver" was the exact same file as the original one.
Well, the TMOUS have 576Mb of RAM and 1024Mb of ROM, RAM and ROM are two different things.
Click to expand...
Click to collapse
The mass hysteria on this subject and tons of noobs lurking for "576 RAM" effectively make this story a worthless hoax.
I know. I've misread his question regarding LEO1024, just missed the "MB" point.
i am going to clear this up once and for all
1ghz hack = fake
576mb RAM = REAL as conclusively proved by advanced testing when it was first discovered, the fact that it comes as default whena tmous rom is flashed on a EU hd2, and my own testing (i built a rom wiht a 400mb pagepool and was able to sucessfully fill the remaining 50 odd mb of ram before the system gave out)
end of story
G
I've tried to load a lot of programs to test 576mb ram. After 10min test i loaded ~20progs and: In Use 372mb ram free 86........so i think 576mb is REAL I also tried memory test program that used all ram except last 10mb....
Real life tests with documented results. Please.
Something to keep in mind if you are opening loads of apps to test the memory:
When i have Opera 10 running in the background, it sometimes stops me opening HTC albums saying there isnt enought memory when there clearly is. As soon as you close it, it opens again.
So maybe you have opera 10 running when you try to open HTC album, causing the error. Close opera 10 and see what happens
That Ram bonus would be usefull if we were using ALOT of apps simultaneosly . But never in my experience with this phone needed more ram . So If you plan on installing a long list of apps and running them all in background(just to boast) maybe more ram is required. But aside the app that eats ram to check if it is valid i do not know of anyone to have reported to reach the limit with even pro usage.
If the phone hardware recognizes the extra ram and uses it then it is there. The extra tmous radios enable the phone to use more of its hardware perhaps? Remember PCs...? Windows x86 works up to only 3 gigs of ram even if you have 16 gb of ram installed onto the motherboard. Using a higher functionality operating version in x64 mode (for dual-core proc) enables the " hidden ram " . The ram was always there but the system needed a better programing to use it . I am not much of a computer expert but i guess its not fake, only that u do not need it !
It is my personal thinks:
The fact:
- ROM that show 448 MB run smoother than ROM that show 576Mb as I fell and some tests.
The reasons may be:
- HD2 (Leo) have enough 576Mb, it is real.
- With basic ROM, the manufacturer hide some part of RAM to use it for permanent applications/programs that may support for WinMo run faster and smoother and that apps/progs do not need to start/stop usually. The hidden part could be set to priority access mode (may be). And the RAM shown for you is 448 Mb only and you could do every thing with this part of RAM.
- The ROM that hacked RAM side to be shown as 576Mb open the hidden part and make all off RAM could be used randomly by user. In that case, top necessary applications run by Windows should start and stop many times, it may make the OS be slower a little.
It is my idea.
The question is not If 576MB RAM is real (its proven to me), it's the question if there may be 1GB ROM also.. as I don't see any reason why they would do that little change if they alrdy didn't change the 576 RAM thing
The only question is.. why don't TMOUS roms unlock the (may) hidden ROM?
I guess it could some realy deep coded software thing.. not sure if thats even possible..maybe others can tell
We will see alot more clear if we can boot into linux =)
Cheers
the actual chips are different for the rom. cotulla posted the two chip model numbers. one has 576ram512rom onboard the other has 576ram1024rom.

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.

Categories

Resources