If you’ve developed apps for Windows CE devices you might at some point in one of your miserable days have been presented with out of memory exceptions. One reason may be due to the memory management of Windows CE. Prior to Windows Embedded CE 6.0, all processes received a 32MB virtual address space to play with. This by the way includes Windows Mobile 6.0 which is based on Windows CE 5.0. Therefore loading a few bitmaps in your applications can quickly eat into this quota. There is however a workaround that allows you to keep resources such as bitmaps on the high memory area which is shared across all applications. This is done by simply keeping all your code and resources separated into managed dll’s. You would then simply use your exe as driver to a dll that would start your application.
Here’s an in depth blog post that I’ve across that explains how this is done:http://blogs.msdn.com/robtiffany/archive/2009/04/09/memmaker-for-the-net-compact-framework.aspx
Here’s another interesting post that gives an introduction into how the .NET Compact Framework’s CLR allocates memory:http://blogs.msdn.com/stevenpr/archive/2005/12/12/502908.aspx