Export (0) Print
Expand All

Process Address Space

Windows CE .NET

When a Windows CE-based device starts up, the operating system (OS) creates a single, 4-GB virtual address space, which all 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 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, followed by the stack, the heap, and the executable (.exe) file. The bottom 64 kilobytes (KB) are always 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 depends on 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.

See Also

Migrating from an Open Source Platform to Windows CE | Processes

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.

© 2015 Microsoft