Microsoft KB Archive/259932

{|
 * width="100%"|

INFO: Process Space Usage by ROM-Based DLLs

 * }

Q259932

-

The information in this article applies to:


 * Microsoft Windows CE Operating System versions 1.0, 2.0, 2.11, 2.12, 3.0

-

SUMMARY
Dynamic link libraries (DLL) that are included in the MODULES section of the Windows CE binary image builder (BIB) files will consume a portion of the address space of all processes running under Windows CE.

MORE INFORMATION
When the ROMIMAGE build tool assembles the ROM image, it determines the base address for DLLs and performs address fixups within the DLLs. DLLs are assigned address space starting from the top region of process slot 0. Because the fixups cannot be changed, the address space for the DLL is reserved in all processes even if the process does not load the DLL.

Each process receives a 32-megabyte address space, and therefore having a large number of DLL modules can adversely affect the amount of address space available for memory allocations for each process.

Any DLLs that are used infrequently and may be unloaded during normal execution of the process should be moved to the FILES section of the BIB file. In this way DLL files are loaded into available RAM and occupy a portion of the virtual address space from only those processes that use them. If the DLL is simultaneously loaded into a second process, then the address range chosen for the first process must also be available to map the DLL into the second process. If the address range is already occupied in the second process the DLL load will fail.