Memory Pages

In Windows CE, you allocate memory one page at a time. You cannot allocate less than a page, and as a programmer, you have no control over the page size. That is determined by the original equipment manufacturer (OEM). Currently, your choice is either 1 KB or 4 KB. When choosing a page size, the OEM is faced with tradeoffs: A large page size often wastes memory, but a small page size requires more operating system overhead to keep track of pages. When you need to allocate memory for a small object, the larger your page size, the more memory you waste. On the other hand, a small page decreases the amount of memory the translation look-aside buffer (TLB) can address, which can reduce the buffer's effectiveness.

Because RAM is limited on H/PC devices, OEMs generally keep page size small. When you make decisions that affect memory allocation, you should assume that the device you are using has a 1 KB page size. If you need to know the exact page size for your device, check the page specification with the Remote Memory Viewer tool provided with Windows CE.