INFO: Application Code Paging in Windows CE (260874)



The information in this article applies to:

  • Microsoft Windows CE Operating System, Versions 3.0
  • Microsoft Windows CE Operating System, Versions 2.12
  • Microsoft Windows CE Operating System, Versions 2.11
  • Microsoft Windows CE Operating System, Versions 2.0

This article was previously published under Q260874

SUMMARY

Windows CE supports demand page-loading of application executable code. In this system, a module is paged in, one page at a time, when needed. A page is also discarded when memory is needed and your page is discardable. In paging mode, the whole application is not paged in unless a file system does not support paging.

MORE INFORMATION

Windows CE can be instructed to disable demand paging. This is sometimes useful in cutting down the paging overhead that can affect application/system performance. In this mode, a module is fully loaded into memory before it is run. This can be done at the file system level if a file system does not support paging, or it can be set globally through the Config.bib file. To force a nonpaging system, set bit one of kernel flags by setting ROMFLAGS to 1 in the .bib file.

ROMFLAGS is set in the CONFIG section of the platform's Config.bib file, which is located in the Platform\platname\Files folder of the ETK or Platform Builder installation.

Storage media device drivers can enable demand paging for application code that is stored on their supported media by responding to the DISK_IOCTL_GETINFO IOControl request with the DISK_INFO_FLAG_PAGEABLE flag set in the di_flags field of the DISK_INFO structure.

NOTE: Windows CE versions 2.0 and 2.1 platforms that use an x86 processor should not enable demand paging. ROMFLAGS should always set bit 1 (ROMFLAGS=1) on these platforms. Enabling demand paging may cause a page fault exception (0xE), especially in conjunction with the floating-point emulation.

Modification Type:MajorLast Reviewed:4/14/2004
Keywords:kbinfo KB260874