Windows CE-based platforms usually have no disk drive. Therefore, physical memory, typically consisting of a combination of ROM and RAM, plays a substantially different role on a Windows CE-based platform than it does on a desktop computer.
Because ROM cannot be modified by the user, it is used for permanent storage. The contents of ROM, determined by the original equipment manufacturer (OEM), includes the operating system and any built-in applications that the manufacturer provides, for example, Microsoft® Pocket Word and Microsoft® Pocket Excel on an H/PC. Depending on your product requirements, you can also place application code in ROM.
Because on most Windows CE systems, RAM is maintained continuously, it is effectively nonvolatile. This feature allows your application to use RAM for persistent storage as well as program execution, compensating for the lack of a disk drive. To serve these two purposes, RAM is divided into storage, also known as the object store, and program memory. Program memory is used for program execution, while the object store is used for persistent storage of data and any executable code not stored in ROM.
To minimize RAM requirements on Windows CE-based devices, executable code stored in ROM usually executes in-place, not in RAM. Because of this, the operating system needs only a small amount of RAM for such purposes as stack and heap storage.
Applications are commonly stored and executed in RAM. This approach is used primarily by third-party applications that are added by the user. Because RAM-based applications are stored in compressed form, they must be uncompressed and loaded into program memory for execution. To increase the performance of application software and reduce RAM use, Windows CE supports on-demand paging. With it, the operating system needs to uncompress and load only the memory page containing the portion of the application that is currently executing. When execution is finished, the page can be swapped out, and the next page can be loaded.
Like RAM-based applications, ROM-based executable code, including DLLs, can be compressed. When compressed, the code does not execute in place, but is handled much like its RAM-based counterpart. The code is uncompressed and loaded a page at a time into RAM program memory, and then is swapped out when no longer needed.