Chris Hofmann wrote:

> anybody tried this or understand what some of the issues might be?
> 
> 


I haven't tried it with Mozilla, but I have spent the last year working 
on a project to re-develop our 3D engine for wireless platforms.


One of the main issues would be coping sensibly with memory allocation 
failures. Generally the devices on which Pocket PC runs on have little 
memory 32MB - 64MB. All of this memory is generally not available to an 
application because it is also used as part of the filesystem. So, 
generally it is very likely that on a regular basis you will come across 
'out of memory' failures. When one of these occurs there are a two of 
possible courses of action:

- shutdown the application straight away, making sure that all resources 
are correctly freed.
- partially fail, ie. if you were trying to open a large document, fail 
the load of that document and return to a blank page, or the previous 
page. This is by the far the preffered approach.

In both cases the challenges are how do you propagate the memory error 
back up the call stack and how do you make sure that all resources (file 
handles, heap allocated memory) are freed as you go. There are three 
common approaches to this:

- return error codes from all methods.
- exception handling
- setjmp/longjmp (used by Symbian/Epoc)

Retro-fitting any of these onto an existing codebase is non-trivial.

Other than that the issues aren't that huge, off the top of my head the 
things we found are. The API is nearly the same as Windows, minus a few 
functions that aren't supported on WinCE. The filesystem stuff works 
slightly differently, for example there is no current working directory. 
For strings everything is Unicode based.

Hope that helps,

Dave


Reply via email to