Jump to content
nap_rz

what for and why do OMNIA 2 reserved 50% of it RAM?

Recommended Posts

Someone with internals experience might take a look at this, and if it's the problem, hack up a little garbage collector to add-on. A really basic one that doesn't bother with heuristics or anything, but simply scans existing handles and frees anything with no references would do the trick.\

BTW, it's stuff like this that can easily be patched without all the enormous effort of an entire new ROM release. I've never understood why MS and carriers don't do that for these sorts of things, like they do for desktops/servers.

Edited by dwallersv

Share this post


Link to post
Share on other sites
Hey all,

Stumbled across this thread while looking for some Omnia 2 RAM/app closing information. I develop applications for windows mobile devices and also experienced my application unexpectedly sometimes while in the background. (Still using official WM 6.1.4 ROM, no modifications whatsoever)

I starts closing applications when about 40 MB of ram is left. But one thing i'm still investigating is that i don't seem to get any WM_HIBERNATE messages at all.

A WM_HIBERNATE message would normally be sent to windowed applications to ask them to free any resources not in use because the system is low on resources. However my application never seems to receive a WM_HIBERNATE message, instead a WM_CLOSE message is what i get. Which (if no special precautions are taken) gracefully shuts down the application. I suppose i could ignore a WM_CLOSE message if the "Exit application" action wasn't initiated from inside the application but i think Window Mobile/Samsung utilities just start killing applications if they aren't responding to a WM_CLOSE.

However, this shouldn't be the cause of any "app closing problems" because i wasn't expecting a WM_HIBERNATE message in the first place since it shows ~40 MB of free RAM when it starts killing app. But i thought it was worth mentioning it.

Also wanted to mention another thing i noticed: (if you're not a Windows (Mobile) developer you probably won't understand a lot of what i'm saying here...)

When creating a lot of DC/BITMAP handles (Create(Compatible)DC/CreateCompatibleBitmap) it seems that the application gets killed sooner. When there's still 40 MB of free RAM left my app will get killed more quickly than say a personal navigation application. I'm not saying the navigation app is more lightweight regarding resource usage (on the contrary, taskman shows it uses ~8 MB of RAM while my app only uses 1.8 MB) but i'm suspecting the navigation application just creates one full screen Bitmap and does all it's drawing on there, while my application creates a whole lot of Bitmaps/DCs. Mind you, my application barely allocates any memory from the heap...

This is just a wild guess: Could it be that the video memory is exhausted (is this the ~100 MB reserved RAM memory?) And that, while there's still RAM left that isn't going to be used as video memory, the device thinks apps should start closing because it's low on memory (although that memory is video memory). I'm saying this because i once got an OUT_OF_MEMORY error while creating a bitmap and there was still 40 MB of free RAM. Also, while my app probably uses around 8 mb of memory because of my CreateBitmap calls, taskman shows only 1.8 MB. This seems to support the theory that Create(Compatible)Bitmap memory is allocated as video memory.

If you made it this far... thanks for reading my novel. ;)

uhm, what kind of bitmap ate 100MB of RAM? ;) ;)

for comparison a pc 7 years ago with 64MB of VRAM was able to play decent 3D games at that time @1024x768 and that's including textures....

btw somebody said back then that HTC HD2 also reported to have only 3xx MB of RAM available for windows (compared to 448MB factory claimed), is this the same issue with this phone? is HD2 also doing auto killing programs on certain RAM left?

Share this post


Link to post
Share on other sites
Smalls, it'w the best theory I've seen here so far... Do you know how garbage collection is done by WM for video memory? Or is this an OEM-specific function, therefore implemented (or not! grrrrr....) by Samsung?

As you surely know, a good garbage collector is essential, because the OS simply can't rely on developers to be good citizens about remembering to free resources. Release schedule pressures and competition always take precedence over "good citizen" coding, for understandable reasons (not saying you're like that, just noting reality overall).

I'm not entirely sure how it works on Windows Mobile but i would suspect that any (GDI) handles still in use by a process that is about to exit would be freed by the operating system. I've got some gfx drive experience when it comes to windows NT but, again, i'm not sure if the same applies to windows mobile. But freeing bitmap memory would be delegated to the display driver since it was probably also used to allocate it in the first place.

uhm, what kind of bitmap ate 100MB of RAM? ;) ;)

for comparison a pc 7 years ago with 64MB of VRAM was able to play decent 3D games at that time @1024x768 and that's including textures....

A 7 year old PC would probably also be able to run Windows XP and 20 instances of Internet Explorer while having Microsoft Word open (without automatically closing any of them because it is low on memory ;) )

I'm not stating that all of the 100 MB memory is video memory, or that any of that memory is video memory at all. Just writing down my experience about how it is odd that applications which consume a lot of memory from the heap - but aren't allocating a lot of video memory - won't get closed and some applications (one i'm working on for example) gets closed while i barely allocate any data memory but i do make a bunch of GDI calls to create bitmaps.

Edit:

Anybody noticed that the Samsung Touch player usually doesn't get closed? I sometimes notice that other applications get closed in favor of the touch player.

Edited by biggiesmalls

Share this post


Link to post
Share on other sites

Well this is all pretty disturbing reading.

I have been looking at replacing my Omnia i900 with either an Omnia II or a Touch HD and have been leaning towards the Omnia because of the LEDs for the Camera, the video recording and the 8GB my storage. Now I find that it has less useable RAM than my original Omnia!

I know that running with about 57 -60 MB of RAM in my i900 after soft reset is fairly limiting when I fire up Opera for some serious browsing so I hate to imagine trying it with less.

Looks like it is going to be a Touch HD (pity I cannot stretch to the HD2 :) ) in my future....

Edited by uMP2k

Share this post


Link to post
Share on other sites
So memory leak is present on all 6.5 roms including 6.5.x ?

I'm holding back when it comes to blaming Microsoft for this, i don't think there are leaks in Windows Mobile 6.x (or at least not serious enough to cause the problems we're having with the Omnia II).

You shouldn't forget that OEMs can and will heavily modify Windows Mobile by adding their own drivers/utilities and what not. On my Omnia II for example i have noticed that with the message application open (i don't really know what the official name is but it is the screen where you can view your text messages/e-mail accounts etc.) most of the scrolling operations, at least that's where i find the effect to be the most noticeable, will kind of stutter and also the Samsung Touch player will show hick-ups while playing a movie (you can clearly see it while playing the "imploding helicopter" demo movie). When you kill the message application, all scrolling operations (in the file explorer for example) and the touch player will work just fine.

In my opinion the Windows Mobile graphics subsytem is probably just fine, i think the modification made by Samsung (e.g. an app leaking memory, poorly coded driver etc.) are the more likely causes of the problems we're experiencing.

Edited by biggiesmalls

Share this post


Link to post
Share on other sites

today I found a wonderful app from xda called....cleanram

http://forum.xda-developers.com/showthread.php?t=514333

this app have 3 level of clearing RAM from our system, I've tried the 2nd stage, and it's slightly better than sktools at doing the job clearing some ram

however, I still haven't use the 3rd stage, which looks well, a bit 'scary' lol....

if anyone wants to try it, try it :)

perhaps if you can take a look inside the codes you can get an enlightement for this RAM issue....

Share this post


Link to post
Share on other sites
today I found a wonderful app from xda called....cleanram

http://forum.xda-developers.com/showthread.php?t=514333

this app have 3 level of clearing RAM from our system, I've tried the 2nd stage, and it's slightly better than sktools at doing the job clearing some ram

however, I still haven't use the 3rd stage, which looks well, a bit 'scary' lol....

if anyone wants to try it, try it :)

perhaps if you can take a look inside the codes you can get an enlightement for this RAM issue....

It's a handy tool indeed. Sadly, it only messes with the part of RAM that is available to general system (famous 139.15 more or less) ... the reserved part remains untouchable

Share this post


Link to post
Share on other sites
On my Omnia II for example i have noticed that with the message application open (i don't really know what the official name is but it is the screen where you can view your text messages/e-mail accounts etc.)

That's called the messaging application :)

Share this post


Link to post
Share on other sites
today I found a wonderful app from xda called....cleanram

http://forum.xda-developers.com/showthread.php?t=514333

this app have 3 level of clearing RAM from our system, I've tried the 2nd stage, and it's slightly better than sktools at doing the job clearing some ram

however, I still haven't use the 3rd stage, which looks well, a bit 'scary' lol....

if anyone wants to try it, try it :)

perhaps if you can take a look inside the codes you can get an enlightement for this RAM issue....

I've been using it from its early version and works fine in all its three stages (most of the time, I got best result on level two!) BUT still I DO prefer SKTools' FreeUP RAM performance over HTC-CleanRAM

Share this post


Link to post
Share on other sites

well i found a solution that works pretty great. the most i could get is 20mb before programs close. this is the best i can do without hacking anything. ive tested this thoroughly and 20mb is the threshold. nothing more. since over 100mb is reserved, this device is comparable to a device that only has 128mb of ram. after this tweak, i compared the omnia2 with a device with 128ram, and they work exactly the same. the other phone i compared it to is the htc tytn2 which is a phone ive used the past two years without any problems with ram. this is good news really, as in my testing of everyday use, i never encountered the phantom closing.

ok go to reg editor change the following values

HKLM\System\OOM

cbLow = 32768

cbVlow=32768

cpLow=16

cpVlow=16

setting them lower will not make a difference. this is the max.

also, this tweak will give you a little extra ram

HKCU\Performance\

change "Available ram on boot" to 9281600

eventually this value will decrease to a max value, but it should give u a little extra ram. i got 10mb extra. setting it higher will not give you more ram

now reboot

im getting consistantly 60mb free ram when no programs open.even when i open them and close them, i return back to around 60mb. my device is not suffering from any memory leaks at all. nothing eats up my ram anymore.

i have a i8000L bell branded. i disabled touchwiz homescreen,sms/email skins,and lock screens(ms and samsung). i use samsung phone dialer and contacts apps. thats pretty much my major tweaks to the interface.

theres a way though to change the threshold to a lower amount of ram before apps close, but it will involve some hacking of GWES. i dont have time right now to work on that though. there should be the code in there that has a different threshold,higher than those values we set in the registry. we have to decrease that number.

Edited by touchflo

Share this post


Link to post
Share on other sites
Well this is all pretty disturbing reading.

I have been looking at replacing my Omnia i900 with either an Omnia II or a Touch HD and have been leaning towards the Omnia because of the LEDs for the Camera, the video recording and the 8GB my storage. Now I find that it has less useable RAM than my original Omnia!

I know that running with about 57 -60 MB of RAM in my i900 after soft reset is fairly limiting when I fire up Opera for some serious browsing so I hate to imagine trying it with less.

Looks like it is going to be a Touch HD (pity I cannot stretch to the HD2 :) ) in my future....

Well now that I have read this thread and similiar ones on the board it does not look likely that the missing 100MB of RAM is ever going to be released. Even with all the hacks I have read about 60MB seems the limit for free program memory. After using my Omnia I900 for a lot of web and other data needs I have found that is just not enough for me (especially as I like M2D which chews up quite a bit of memory) so looks like the Omnia 2 is another example of Samsung hamstringing what should be a great phone.

Share this post


Link to post
Share on other sites

I guess that people are complaining about the following screenshots.

You can see that samsung settings claims to have 256mb of ram, and 50% reserved for something that we don't know.

post-318636-1262081688_thumb.png

If you check winmo memory settings, you will see that it claims to have only 140mb of available program memory.

post-318636-1262081701_thumb.png

I want to know why too.

Share this post


Link to post
Share on other sites

I do notice that the reserved ram part does jump in numbers..., i also have applied the registry hack for extra 10mb. I wonder if it is the hack or the it is the difference from L5 ROM.

Currently i have reserved ram of 187.37mb and free 68.63 with Samsung Today plugin running from OmniaPRO.

Share this post


Link to post
Share on other sites

well i found a solution that works pretty great. the most i could get is 20mb before programs close. this is the best i can do without hacking anything. ive tested this thoroughly and 20mb is the threshold. nothing more. since over 100mb is reserved, this device is comparable to a device that only has 128mb of ram. after this tweak, i compared the omnia2 with a device with 128ram, and they work exactly the same. the other phone i compared it to is the htc tytn2 which is a phone ive used the past two years without any problems with ram. this is good news really, as in my testing of everyday use, i never encountered the phantom closing.

ok go to reg editor change the following values

HKLM\System\OOM

cbLow = 32768

cbVlow=32768

cpLow=16

cpVlow=16

setting them lower will not make a difference. this is the max.

also, this tweak will give you a little extra ram

HKCU\Performance\

change "Available ram on boot" to 9281600

eventually this value will decrease to a max value, but it should give u a little extra ram. i got 10mb extra. setting it higher will not give you more ram

Tried the first hack and it appears to work. I have Samsung today & Garmin running in main memory and I have about 61mb free closing apps as I go along which is way better than before. The second hack "Available ram on boot" made no difference and it appears to be dynamic as it changes as to what the physical ram available is - in my case about 76mb.

Share this post


Link to post
Share on other sites

Good news: New Kuanchai’s ROM have more free RAM memory: www.modaco.com/content/i8000-omnia-ii-gsm-rom-discussion/298087/rom-wm-6-5-3-i8000-rom-with-bt-voice-dialing-thai-eng-version. I know it doesn’t solve the reserved memory's problem, but helps a lot.

Sorry for my bad English. Greetings from Brazil.

Share this post


Link to post
Share on other sites

guys i've recently switched from a blackberry, i've done a lot of programing with my storm/tour, built custom themes, designs animations ect... i am not very familiar with windows type OS but from my exerience with the Blackberry Storm we have a lack of RAM memory issue as well, we solved this but "shrinking" the OS if you will... basically cutting out unecessary files and/or shirkning them so when they were or if they were loaded onto the BB Storm they would not take us nearly as much ram and overall the phone performed 100% better... it will prob. take me a few weeks to get into the in's and out's of this phone but there abosolutely is a work around with this issue we just need to keep looking deeper into it...

Share this post


Link to post
Share on other sites

 

HKLM\System\OOM

cbLow = 32768

cbVlow=32768

cpLow=16

cpVlow=16

gr8! seems to work on my b7610 from usual 45 it boosted to 57 after start

Previously I have also this applied:

HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\LowMem\ProgramMem"ProgramMem"=dword:96

which also frees some ram.

also, this tweak will give you a little extra ram

HKCU\Performance\

change "Available ram on boot" to 9281600

this does not affect ram memory at all in my case

regards,

stn

Share this post


Link to post
Share on other sites
well i found a solution that works pretty great. the most i could get is 20mb before programs close. this is the best i can do without hacking anything. ive tested this thoroughly and 20mb is the threshold. nothing more. since over 100mb is reserved, this device is comparable to a device that only has 128mb of ram. after this tweak, i compared the omnia2 with a device with 128ram, and they work exactly the same. the other phone i compared it to is the htc tytn2 which is a phone ive used the past two years without any problems with ram. this is good news really, as in my testing of everyday use, i never encountered the phantom closing.

ok go to reg editor change the following values

HKLM\System\OOM

cbLow = 32768

cbVlow=32768

cpLow=16

cpVlow=16

setting them lower will not make a difference. this is the max.

also, this tweak will give you a little extra ram

HKCU\Performance\

change "Available ram on boot" to 9281600

eventually this value will decrease to a max value, but it should give u a little extra ram. i got 10mb extra. setting it higher will not give you more ram

now reboot

im getting consistantly 60mb free ram when no programs open.even when i open them and close them, i return back to around 60mb. my device is not suffering from any memory leaks at all. nothing eats up my ram anymore.

Thanks

I made a cab with this reg settings for easy installation and noobs :)

Free_Ram_Performance_Tweak.cab

Share this post


Link to post
Share on other sites

@whiskeybro: Thanks for the cab. I got 18mb more free ram using KC IL5 rom (55 mb before closing apps).

Cheers

contable

Edited by contable

Share this post


Link to post
Share on other sites
...

HKLM\System\OOM

cbLow = 32768

cbVlow=32768

cpLow=16

cpVlow=16

thanks touchflo for your post! I'm trying this out.

Could you also tell me what value you've got for "Reserved"?

I had tweaked it earlier and would like to hcange it back but forgot to write down the original value.

Share this post


Link to post
Share on other sites

I wonder, are 7610 omnia pro, 7620 giorgio armani and 73xx omnias also suffering from this problem?

Edited by nap_rz

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.