Allocating Memory for Data Storage

Before data is stored in a virtual address, data storage must be allocated to that address. In Windows NT/98/2000, data storage is allocated from the paging file, but in Windows CE data storage is allocated from the physical memory allocated to program execution. Data storage is always allocated in whole numbers of pages, and in Windows CE pages are either 1 KB or 4 KB, depending on theplatform and the CPU architecture. Typically a number of pages are allocated at the same time, and these allocations must always start on an "allocation boundary," which in Windows CE is typically a 64-KB boundary.

Applications can manage their memory allocations at the page level using VirtualAlloc and VirtualFree. This can be ...

Get Windows® CE 3.0 Application Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.