INFO: Address Space Layout of a Windows CE Process

Article translations Article translations
Article ID: 326162 - View products that this article applies to.
This article was previously published under Q326162
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

Summary

This article describes the 32-MB address space layout for a Microsoft Windows CE 3.0 process. It includes information about where DLLs are located and where the application (EXE) code is located. The article also describes the location of heaps and stacks.

More information

Windows CE is a 32-bit operating system. The address space of the whole system ranges from 0 to 4 GB, with the largest value for a 32-bit address. The address range from 2 GB to 4 GB is reserved for the system.
Collapse this tableExpand this table
4 GBReserved for system
2 GBFile Mapped Memory
1 GB + 32 MB32 process slots
32 MBActive process, slot 0
0

The address space that ranges from 0 to 1 GB + 32 MB is additionally divided into 33 different sections. These sections are named "process slots," with slot 0 at the bottom and slot 32 at the top. Slot 0 is used for the active process.

Each process on Windows CE maintains 32 MB of address space for DLLs, stacks, heaps, and other allocations. The 32-MB area that starts with address 0x02000000 is reserved for ROM-based DLLs that are designated as execute in place (XIP) functionality.
  • DLLs that load from RAM by the process follow the ROM-based DLLs.
  • Any free address space that is available to the process follows next.
  • The heap or heaps are present in the address space.
  • The stack or stacks are next
  • The sections for the EXE module reside lowest in the process address space. These addresses start at 64 kilobytes (KB) with address 0x00010000.
  • The system reserves the address range from 0 to 64 KB.

The order where heaps and stacks appear as described earlier is generally for simple applications. In a more complex application that has run for a while, the heaps and the stacks can appear in various orders and anywhere in the 32-MB address space that is free address space. This includes the region where ROM DLLs are designated.

When the heap manager must increase the size of the heap, it calls the VirtualAlloc function with the IpAddress parameter of NULL. For an application that uses a lot of memory and address space, Windows CE increases the size of the heap anywhere it can find free address space. That includes the region where the ROM DLLs are designated.

When an application creates a thread, Windows CE allocates a stack for the thread that uses VirtualAlloc. Again, Windows CE allocates the stack anywhere it can find free address space for the process that owns the thread.

References

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
259932 INFO: Process Space Usage by ROM-Based DLLs

Properties

Article ID: 326162 - Last Review: October 26, 2013 - Revision: 4.0
Applies to
  • Microsoft Windows CE 3.0 for the Handheld PC
Keywords: 
kbnosurvey kbarchive kbinfo KB326162

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com