Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need to fix reserved stack size for Windows Mobile builds + DLL cruch problem

24 views
Skip to first unread message

Alan Lee

unread,
Nov 18, 2008, 11:48:31 AM11/18/08
to Fennec
To all developer working on Windows Mobile build,
1.
It seems the stack size for Windows Mobile build is not specified and
therefore set to default which is 1MB(0x100000).
This value is too large for Windows Mobile and it should be fixed to
64KB(0x10000)
or it would waste too much virtual memory which is a very scare resource in
Windows Mobile.

I think we need to add the following line to arm-wince-gcc.c

args[i++] = "/STACK:65536";

- To check the reserved stack size run: dumpbin.exe /HEADERS xulrunner.exe
- To change the stack size manually run: editbin.exe /STACK:65536
xulrunner.exe


(Starting from VS2005 SP1, if you create a NEW Windows Mobile project the
reserved stack size is set to 64KB in the project properties by default.
We need to fix old project files manually.)

I would file a bug if needed but I haven't filed one before.
Maybe a good chance to start.

2.
Also we need to figure out how to work around the virtual memory limitation
on current Windows Mobile builds.
Xul.dll is over 15MB in size and it is just not going to work out well
unless we plan to run only on Windows Mobile 7
having a new virtual memory model based on WinCE 6.0 kernel.

Loading a huge dll exceeding 15MB in size will potentially make devices
unstable and may cause all sort of unexpected problems.
It's been called the "DLL cruch" problem.
Main source of the problem is that the virtual memory addresses allocated to
dlls are shared.
If you are not familiar with the virtual memory issue please read the
article in the link below.
- http://msdn.microsoft.com/en-us/library/ms836325.aspx
(I could write up a more detailed post if needed.)

People might be busy trying to get things to work so it might not be a
concern today
but I think this is a high-risk item for Windows Mobile.

Alan Lee

0 new messages