Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. # INFO: Address Space Layout of a Windows CE Process
  2.  
  3. _This article was previously published under Q326162_
  4.  
  5. ## Summary
  6. 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.
  7.  
  8. ## More Infomation
  9.  
  10. 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.
  11.  
  12. |||
  13. |---|---|
  14. |4 GB|Reserved for system|
  15. |2 GB|File Mapped Memory|
  16. |1 GB + 32 MB|32 process slots|
  17. |32 MB|Active process, slot 0|
  18. |0||
  19.  
  20. 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.
  21.  
  22. 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.
  23.  
  24. - DLLs that load from RAM by the process follow the ROM-based DLLs.
  25. - Any free address space that is available to the process follows next.
  26. - The heap or heaps are present in the address space.
  27. - The stack or stacks are next
  28. - The sections for the EXE module reside lowest in the process address space. These addresses start at 64 kilobytes (KB) with address 0x00010000.
  29. - The system reserves the address range from 0 to 64 KB.
  30.  
  31.  
  32. 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.
  33.  
  34. 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.
  35.  
  36. 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.
  37.  
  38. ## REFERENCES
  39. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
  40.  
  41. - 259932 INFO: Process Space Usage by ROM-Based DLLs
  42.  
  43. ## Properties
  44. Retired KB Content Disclaimer
  45. This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement