More on WM's memory management here:
http://msdn.microsoft.com/library/de...advmemmgmt.asp
http://msdn.microsoft.com/library/de.../threads30.asp
http://blogs.msdn.com/mikezintel/arc...08/278153.aspx
http://cs856.watsmore.net/windowsce_arcd.pdf (PDF)
You
can assign more than 32MB of memory in one process by using memory mapped files:
Quote:
When a Windows CE-based device starts up, the operating system creates a single, 4-GB virtual address space, which all of the processes share. Part of this address space is divided into 33 "slots" of 32 MB each, one for each process's resources. As each process starts, Windows CE assigns it one of the available 32-MB slots. Slot zero is reserved for the currently running process.
When a process starts, the OS stores all of the dynamic-link libraries (DLLs), the stack, the heap, and the data section in the slot that is assigned to the process. DLLs are loaded at the top of the slot, and they are followed by the stack, the heap, and the executable (.exe) file. The bottom 64 kilobytes (KB) are always left free. DLLs are controlled by the loader, which loads all of the DLLs at the same address for each process.
In addition to assigning a slot for each process, Windows CE creates a stack for the primary thread and a heap for the process. The maximum number of threads that a process can maintain is dependent upon the amount of available memory. You can allocate additional memory outside of the 32 MB that is assigned to each slot, by using memory-mapped files or by calling the VirtualAlloc function to reserve or commit a region in the calling process's virtual address space.
|
If that is a good thing, I don't know. Laurens was mentioning the limit not to point out a disadvantage, I think, but a safe-guard by Microsoft to prevent process from misbehaving (by allocating too much of the total available RAM).