The Virtual Address Space

< BACK  NEXT >
[oR]

In Windows CE, all applications and application data use a single 2-GB virtual address space. This is different from Windows NT/98/2000, where each application has its own 4-GB address space. The virtual address space defines the addresses that a pointer can point at. Before data can be stored at an address, it first must be backed by physical memory.

Within the Windows CE 2-GB address space, each application is allocated a 32-MB address space into which all its memory requirements, DLLs, and code are mapped. There are 32 such address slots available, and this limitation defines the maximum number of processes that can be run in Windows CE. These 32 slots occupy 1 GB of address space, and the remaining 1 GB is used for shared memory (for example, memory-mapped files) and operating system requirements.

When a thread in a process is scheduled for execution, Windows CE moves the application down into slot 0, and effectively remaps all the addresses in the process so they fall within the range 0 to 32 MB. When the thread's execution quantum is complete, the process's addresses are remapped back into its original slot. Therefore, all addresses in a process will appear to be in the range 0 to 32 MB regardless of which slot they are assigned to. The bottom 64 KB of address space are protected and cannot be accessed by an application.


< BACK  NEXT >


Windows CE 3. 0 Application Programming
Windows CE 3.0: Application Programming (Prentice Hall Series on Microsoft Technologies)
ISBN: 0130255920
EAN: 2147483647
Year: 2002
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net