Windows Mobile CE5 32 MB memory limit removal? - Windows Mobile Development and Hacking General

hello
is there any hack to bypass or increase the 32 MB memory limit in WM 5 , 6 , 6.1 Or 6.5?
I am using a program that stops at 32 MB memory usage and It needs around 40+ MB to complete?

I seriously doubt it, as each application gets a 32MB "slot" of virtual memory to use, so there's a 32MB per process limit.

Are you using QEMU?
However, maybe this is possible.
We'll know if it's possible as soon as I try to run QEMU and install WindowsXP on my HTC HD2
If the WinXP installation will be fine and taking over 32MB of RAM, then it's possible even on other devices.
Why I'm talking about HD2?
This is simple.
The HD2 got a lot of RAM and this is a new device.. and maybe HTC has removed this limit. If this will work, I hope the limitation isn't in the NativeKernel!

The limitation is in the native kernel. It doesn't matter how many RAM your device actually got. The whole memory management is build up on it. I doubt you could change that with a little hack. Actually I guess there's a lot more behind it than only a merely "if size >= 32K"....
Wait for WM 7 which is based on Windows CE 6 (or later) which doesn't have that limitation anymore, since they completely rewrote the native kernel therefore.

I guess you could use multiple processes... It sucks, but I don't see another choice. The limit per process is 32 Mb. There is no limit on an app per-se afaik...

charge1313 said:
I guess you could use multiple processes... It sucks, but I don't see another choice. The limit per process is 32 Mb. There is no limit on an app per-se afaik...
Click to expand...
Click to collapse
Solution.
With a 32MB page per process, your only choice is to develop your app in multiple processes.
Sorry!

Related

attach to today process and services

Compared with OS like windows xp, window mobile is limited with max process around 30. when it is reached to this figure, the os will kill one or more to keep this limit.
So does anyone know if it is possible to create a program by using the way like attaching to today (should be shell.exe I think) or using services to keep the number of process low? and is there any limitation by using such ways?
Well actually the number is not 'around 30' it is exactly 32 according to WM documentation.
But you rarely reach this number due to other considerations.
Still there are some things that do not count as a process, namely DLLs.
You can create a today plugin or a service DLL.
The limitation for services would be the size of the virtual memory slot they occupy.
Thanks, the number 30 is based on my experience. I have tried to open 100 processes by mortscript and in the end, only 30 or less was survived on my wm6 device. This figure is even smaller for my wm2003se device, it is just around 20.
I am really waiting for wm7, so I can run as many program as I like without considering any program being killed by the OS.
mic2007 said:
Compared with OS like windows xp, window mobile is limited with max process around 30. when it is reached to this figure, the os will kill one or more to keep this limit.
So does anyone know if it is possible to create a program by using the way like attaching to today (should be shell.exe I think) or using services to keep the number of process low? and is there any limitation by using such ways?
Click to expand...
Click to collapse
Hi! You should take a look here: http://forum.xda-developers.com/showthread.php?t=235792
What you need is PerformCallback4 function which is undocumented (excluded from SDK) but still exists there.
Thank you!
mic2007 said:
I am really waiting for wm7, so I can run as many program as I like without considering any program being killed by the OS.
Click to expand...
Click to collapse
One thing to keep in mind is this: each process takes up system resources (real memory, virtual memory, GDI, etc)
32 is the max system managing capability and that includes processes run by the system not just the ones you start.
The reason you got the low (and different) numbers is most likely because your device ran out of memory before you reached the quota or there were processes running in background you were not aware of.
While the promise of running more than 32 processes on WM 7 architecture is nice we can only hope it will be accompanied by more than 64MB of RAM or it will be pretty useless...
Yes, low memory is another factor that the OS kill one or more processes to free up resources. Supposedly WM7 is based on CE 6 kernel that should allow storage card to be used as RAM, if that is the case which means the distance between desktop and handheld device will be much closer.
Using SD as RAM is about the last thing you want to do!
I have not heard of this feature but even the fastest cards (assuming the device will have a faster bus to support these speeds) are too slow to act as RAM.
Or perhaps you are referring to using it as swap space like the hard drive on a PC? That can work but speed would still be sacrificed.

RAM size smaller?

Why is it certain devices doesn't allow all RAM to usable?
for example ASUS A620 has 58MB out of 64MB RAM. Does it depend on PocketPC 2003 OS is in it?, does this limitation dissapear if Linux or other is used?
The operating system is copied into RAM when the phone starts up. On any OS, even if the bulk of the OS can run directly from ROM or flash memory, some RAM will be required in order to store volatile data.
RAM ISSUES: = http://www.emobistudio.com/memoryup_wm.html
Jinty said:
Why is it certain devices doesn't allow all RAM to usable?
for example ASUS A620 has 58MB out of 64MB RAM. Does it depend on PocketPC 2003 OS is in it?, does this limitation dissapear if Linux or other is used?
Click to expand...
Click to collapse
Some of the RAM is used in PagePool, some is used for the Radio ROM, some is used for the XIP, all of which are system usages, and cannot be prevented. 58 out of 64 is pretty good going, on my Prophet I get 48-50 depending on the PagePool

20080616> Can WM 6.1 have 64 MB Program Memory?

Requests/suggestions please for WM 6.1 cookers considering their next release:
- 64 MB Program Memory
- Absolute bare skeleton WM 6.1
- essential candidates for removal:
> customer feedback
> windows live
> any windows help & support related bloatware
> error reporting
> search
> windows media player
> any animated items, icons, etc..
> junk items under \windows; unnecessary gif,jpg,bmp,png
etc, text files
- single boot screen, no splash, animations etc..
minimize WM 6.1 boot time
- removal of other misc bloatware, vaporware that are not
core to the function, speed and stability of WM 6.1
======================================================
To the site Administrators:
-------------------------
- can we initiate a donation bucket in which people may contribute
and pool donations?
- 1 month period (or other) in which donations can be collected and
cookers may submit their best releases
- the people (users) vote during the period on what they find to be
the most efficient, stable, fast, clean and best performing rom.
- at the end of the period the donation pool is distributed to the top 3
most voted cookers, e.g. 60%/25%/15% respectively.
======================================================
Suggestions, ideas, recommendations, criticism etc certainly
welcome.
Thanks to all
--kara
64M program memory mean No WM.
why?
is there a maximum?
Thanks,
ks1781 said:
why?
is there a maximum?
Thanks,
Click to expand...
Click to collapse
you are really someone )
Trinity have only 64MB build in , how come it have 64MB program memory ? DId you have brain ?
--yes,
if the device has 64 MB SDRAM, why is it that most cooked roms
generally present approx. 50 MB of that?
is this a limitation or is missing 14 MB used for a special purpose?
Thanks for any advice.
?? because it takes up space to install the operating system.. even a 'bare bones' operating system is still an operating system..
did you ever wonder why there's space missing from your hard drive after you install windows xp?
http://www.htc.com/www/product.aspx?id=470
Memory ROM: 128 MB
RAM: 64 MB SDRAM
What is the ROM 128 MB designated for?
Thanks for your patience with me.
--kara
if i understand him correctly, he is referring to the program memory i.e. RAM not ROM. the 128MB ROM is meant for installation of OS (WM) where the 64MB RAM is the execution power. we normally get ~20MB-25MB RAM free out of 64MB total. i believed the rest (64MB - 25MB) was used for other services once WM started.
yes, that is what i'm trying to understand..
in this p3600 specification from HTC:
http://www.htc.com/www/product.aspx?id=470
it lists>
128 MB ROM
64 MB RAM
=================================================
for the 128 MB ROM
I assume the 128 MB ROM contains the OS installation, with
some component of this ROM hidden/reserved.
E.g. some cooked roms released have 'Big Storage'
~70 MB available to the user for NV storage
the remaining 58 MB comprises OS installation and a reserved
area.
=================================================
for the 64 MB RAM
This is the volatile memory available for the OS to boot & run, and
for program execution.
However, on most cooked roms I have used, under
Settings -> System -> Memory
'Program Total' is reported as ~50 MB.
So my question is - where is the remaining 14 MB RAM??
as dum as it sounds i've wondered about that too
even formatting issues aside (like how hard drive capacity is always lower than reported), 14MB seems like a lot to 'go missing'.
why doesnt WM even report it? because its being used by the system for services? so then why does it ALSO report itself using around 20MB of what's left?
that way, it's like 14 MB used (hidden) + approx. 20MB reported (shown) = approx. 34MB total? :/ hmm
ks1781 said:
So my question is - where is the remaining 14 MB RAM??
Click to expand...
Click to collapse
OK - You have a PC with 1GB of RAM say. Once say windows xp has booted up - your AV started etc. you probably have 684MB say of RAM left, so Where did the other 340MB of RAM go to?
Think about it.
wtf i still don't get it... dont be mad
i mean mine reports 2096236 KB... a full 2048MB of RAM
BUT of course 100-300 minimum will always be in use for the system itself
whereas in WM, it reports like 48MB total, AND say approx. 20MB in use
ok so the 20MB minimum in use will ALWAYS be in use because of windows mobile itself. FINE.
but why does it only represent 48MB as available?
and if that is the case, there's that missing unreported 12MB, PLUS that minimum 20MB always in use
that's what im curious about
Just think that Windows XP takes 250/300 mb of ram space....
PS: Please edit your title... Someone could understand that you really have a 64mb free ram rom......
joncgde2 said:
wtf i still don't get it... dont be mad
i mean mine reports 2096236 KB... a full 2048MB of RAM
BUT of course 100-300 minimum will always be in use for the system itself
whereas in WM, it reports like 48MB total, AND say approx. 20MB in use
ok so the 20MB minimum in use will ALWAYS be in use because of windows mobile itself. FINE.
but why does it only represent 48MB as available?
and if that is the case, there's that missing unreported 12MB, PLUS that minimum 20MB always in use
that's what im curious about
Click to expand...
Click to collapse
Maybe it is for the Radio Rom etc...or maybe Microsoft are stealing Ram and stockpiling it....lol
This is actually a valid question.
The system has 64MB of ram, some how 14MB of this ram is allocated away before the OS loads. This leaves 50MB of ram left for the OS, which uses about 20 MB and leaves 30 MB of ram for applications.
I think everyone understands this part.
The question is, what part of the phone is pre-allocating 14MB of ram.
My only guess is the videocard, if not that then it might be the pagefile.
tetsuo55 said:
This is actually a valid question.
The system has 64MB of ram, some how 14MB of this ram is allocated away before the OS loads. This leaves 50MB of ram left for the OS, which uses about 20 MB and leaves 30 MB of ram for applications.
I think everyone understands this part.
The question is, what part of the phone is pre-allocating 14MB of ram.
My only guess is the videocard, if not that then it might be the pagefile.
Click to expand...
Click to collapse
Does it really matter where it goes? Obviously if that memory hasn't been exploited yet by the excellent cookers etc in here....then it can't be of any benefit.
I concur with tetsuo55.
The reasoning proposed by Andych and others still does not quite
correlate.
i.e. 64 = 14 (OS) + ~20 (progs) + ~30 free
the ~20 is supposedly attributed to basic progs,
e.g. phone, filesys, mail etc..
A listing of such process summates to approx. 8 MB total.
That still leaves 12 MB of unaccounted for basic function
and userland process consumption.
Regarding the ATI video chip, general investigation and
settings check of tcpmp would suggest at best it is a
4 MB chip (whether dedicated or shared)
I cant see the 'remaining ~14 MB' that I'm searching for
being used for paging. Paging is part of overall virtual memory,
and involves page outs/ins to a location on some type
of physical media. Additionally, with the usual ~ 30 MB
ram free, in the context of these devices, a swap requirement
is unlikely given the 'free' memory available.
Although 14 MB may seem peanuts compared to standard desktop
ram configurations today - with a p3600 + WM, recovering the
14 MB (if possible) would provide a much welcomed bonus to
the trinity.
--kara
ahh now we're onto something good work ks1781...
i fully agree with the need to just find out the answer to this... most likely it's something that will be perfectly explainable and make sense and we won't be able to do anything once we find out
but it sure would be nice to know
OK I have the 'answer' - straight from a Windows Mobile blog - I'll post it here cos it's all straight to the point and interesting (somewhat) Link is HERE
The Page Pool
Applications use RAM in two ways. There is code that runs, and there is data that is created while it is running. On a NOR device, the code can run directly from the ROM and not be loaded into RAM first. This process is called XIP (eXecute In Place). NAND devices can't XIP, so their code is loaded into RAM and executed from there. If you don't have a Page Pool, this code is loaded into normal RAM. The Page Pool is a mechanism to limit how much code is loaded into normal RAM. With a Page Pool, we can unload code that hasn't been used in a while and reload it later if we need to. We can't do that without a Page Pool.
On a typical NAND-based WM5 device, the Page Pool is 4.5M.
The Radio Stack
Devices with a Cellular Radio have a complicated bunch of code to make their radios talk to cell towers. On some devices, the radio is a self-contained module with its own RAM and ROM. On others, the radio code is stored in the normal system flash. If so, it either needs to XIP, or it needs to be run in RAM. If it's run in RAM, that RAM is taken away from the system.
A typical radio stack takes 4M.
DMA Buffers
Some hardware can write directly into RAM without using the CPU to do it. This is called "Direct Memory Access" or DMA. DMA is very efficient and lets you get a lot more data transferred in the same amount of time, usually for less power. But it's best to set aside your DMA buffers before the system boots. This guarantees that they're there when you need them. PocketPCs have been doing this for a decade. But, back in the old days, the main use for DMA was audio capture. Audio data is small, so the DMA buffers are also small. Video, on the other hand, is big. More data requires bigger DMA buffers.
An OEM will tune the size of the pre-allocated DMA buffers based on what the device is intended to do. If the main goal is still photos, you can use a much smaller buffer. If the goal is recording video, it needs a much larger buffer. If the goal is video conferencing, it needs a bigger buffer still.
DMA buffers range in size between 300K and 6M. For a video capture device, it's likely to use around 4M.
XIPKernel
There are portions of the deepest parts of the OS that have to XIP. If you're on NOR, that code just XIPs like everything else. Not so on NAND. For a NAND system to boot, it needs to load this code into RAM first and then run it from there. When the system is running, it can't really tell if it's running from RAM or ROM, so it assumes it's running from ROM and doesn't count this space.
The XIPKernel region tends to be between 1.5 and 2M.
The Frame Buffer
There is a chunk of RAM set aside to hold everything that's on the screen. (If you want to know more about it, read this.) On most devices, every dot on the screen needs two bytes. A typical Pocket PC has 240x320 dots. That would be 300K. If you have a 640x480 screen, it's 600K. Sometimes, for performance reasons, devices will have two frame buffers. So this could take up to 1.2M.
Click to expand...
Click to collapse
Thanks joncgde2 - good find which provides a sufficient explanation as to the 'hidden' 14 MB.
There is still another question.
WM reports ~24 MB in use (per earlier screen captures) - where 'in use'
is attributed to running applications.
Checking a process listing via task manager shows the total
apparent RAM in use by these 'running applications' to be ~8 MB.
Can anyone provide an explanation to account for the
remaining ~16 MB??

What is the least amount of Free program memory for a still normal operation on 614c?

I still have 42 mb of free program memory (70 mb used) yet i can only start one application at a time before the app closes by itself if i start another program.
I have asked this memory problem question before but have got no reply. Never mind i will ask this question another million times if i have to to get some explanation. Hopefully somebody whose had similar problem and got it fixed can help.
I have even disabled, in my opinion, those useless startup items like ssactivate, addsignature, addaccount, mmisyncapp, vcdaemon.
Is there anybody here who understand programming specifically for Ipaq 612/614 devices regarding the least amount of memory required before the device starts acting up?
well in WinMo there is a limitation with the vm (slot) such that depends on the rom design can cause even you still have free ram but there is no vm space to allocate, see here for detail .
What rom are you using? I think even the stock rom wouldn't do that..may also relate to apps you are using
thanx for your response.
My os is version 6.1 (build 20757.1.4.0)
I will give the article a read. So I guess i have to upgrade 6.5? And if i do upgrade, would it be o.k. to restore 6.1 backup to 6.5?
thanks again
6.5 does not make it better unless we have a native nk.
Are you using the 6.1 rom made by russian? I suggust you try rom from sergiorus if you like 6.1.
delete..double post
Keyx,
The rom i'm currently using is made by Yegv001.
The article is not written in "english", but I guess our device 61x is not a native NK am i right?
Looking for Sergorius now.
well i guess that article i link to is probably too technical..
anyway in normal use you shouldn't encounter such problem..do you use a task manager? winMo has a limitation of 32 process so if you never close app you may run into the problem if you really open a lot of programs. Check your task manager -> view -> process to see how many process you are running
Hi,
Only newer devices have Native Kernel (NK) and not Ipaq 61x?
and
If i have to start reinstalling everything again from zero, which would you recommend me using, 6.1 or 6.5?
and
I don't get it, why do manufacturers keep giving us larger and larger memory if we can only use 32 processes? I used to have a device with only 32Mb or ram and can only run a few applications and wished i could have larger RAM. Now that I have a device with a bigger ram, I'm limited by the number of processes allowed!
and one more shameless question...
IS THERE A WAY OF REMOVING THE 32 APPLICATION LIMIT??? (sorry the caps)
Yes i have 32 processes running, but i need them all...
heeelllppp
sabertooth said:
Hi,
Only newer devices have Native Kernel (NK) and not Ipaq 61x?
and
If i have to start reinstalling everything again from zero, which would you recommend me using, 6.1 or 6.5?
and
I don't get it, why do manufacturers keep giving us larger and larger memory if we can only use 32 processes? I used to have a device with only 32Mb or ram and can only run a few applications and wished i could have larger RAM. Now that I have a device with a bigger ram, I'm limited by the number of processes allowed!
and one more shameless question...
IS THERE A WAY OF REMOVING THE 32 APPLICATION LIMIT??? (sorry the caps)
Yes i have 32 processes running, but i need them all...
Click to expand...
Click to collapse
well your problem is due to 32 process limit of WinMo(or technically is the underlying limit of WinCE 5.x) so it is not relate to the vm(slot) problem. We probably never get native 6.5 nk.exe for 61x since hp is not planning to upgrade it to 6.5 but that is a different issue
If you ever going to reinstall I would say choose whatever suit you the best. 6.1 is pretty stable while 6.5 give you some ui changes but that would depend whether you like the change or not.
WinCE 6 remove the 32 process limit but WinMo 6.x is still base on WinCe 5.x. WinMo 7 will be based on WinCE 6.x but until then we are struck with the 32 process limit.
so for now you would better off use a task manager to close some programs
thanks so much for your help keyx
I will now search for a program that can automatically close services that are no longer required which are still running in the background. Or can do so at a press of a button.

2 Hardware related questions

hi guys!
i just received my HD2 and i already have 2 questions:
1. isn't supposed Hd2 to have a microUSB conector? it looks thiner and wider then connector i had for my old HD. i didn't have guts to stick the old cable in to check if it works. can somebody confirm the compatibility?
2. what the h**l is that 200Mb (more or less) storage memory? on my old hd i never had the memory problem? HD2 isn't supposed to have 512Mb RAM? isn't all available for instaling things omto them? i am totaly confused
thanks a bunch for enlightning!
mini usb - micro usb..... two different things.
512 ram is for programs and the system to use to run things, like ram on your pc, 200 rom is where programs get installed to, liked the hard disk on your pc. don't forget you can instal to your sd card too.
samsamuel said:
mini usb - micro usb..... two different things.
512 ram is for programs and the system to use to run things, like ram on your pc, 200 rom is where programs get installed to, liked the hard disk on your pc. don't forget you can instal to your sd card too.
Click to expand...
Click to collapse
thanks for answers
mini vs micro = ok
the other one is not ok. i am not refering to RAM but to ROM memory. my bad!
so, again - ROM memory should be 448Mb (or 576MB on some custom ROMs)
how come is not all available?
i said before, on my old HD i never had a memory problem and it took me by surprise
incorrect, there is 448(576 with the right cooked rom and radio) ram not rom.
there IS 512 rom on the device,yes, and windows plus the other pre installed stuff takes around 250 meg leaving around 200 for user stuff.
noris08 said:
ROM memory should be 448Mb (or 576MB on some custom ROMs)
Click to expand...
Click to collapse
No, RAM is 448 or 512. ROM is always 512MB. But, about 200-300 of those are used to store the system components (OS).
you guys are right. i am too new with hd2
however, the question is valid - how come is not enough?
i used cooked 6.5.x roms and same apps in my hd with no memory issue
I must say I don't have a problem. small apps get installed to main memory, anything large like sat nav software I instal to memory card. most apps are very small, not much more than 1 or 2 meg, difficult to fill all 200 meg.
Who said it's not enough?
I have around 70MB free now with quite a few apps, no problem so far. But yes we need to think about putting big programs on the storage card indeed (games can be 10-40MB each, typical "big" apps 1-5MB), so yes with a few you can easily fill the internal memory.
But it's also like always, people always want / "need" more even if it's useless... mostly about RAM in this case and the sooo popular 448->512MB fix. With 448MB, you have about 185MB free RAM upon boot. On my previous WM device, I had 80MB free on boot... and never came even close to filling that even with more running programs you'd want to have. So with 100MB more, I'd want to see someone who actually *needs* the extra 64MB...
Its actually an extra 128 meg, not 64, 448meg standard (with 128 set aside for graphics = 320 useable) and after the tweak its 576 with 128 set aside for graphics = 448 useable.
Indeed... seems I can't use a calculator at 1am anymore

Categories

Resources