Memory Management

The Windows CE kernel uses a paged virtual-memory system to manage and allocate program memory. This system provides contiguous blocks of memory, in 1,024-byte or 4,096-byte pages along 64-kilobyte (KB) regions, so that applications do not have to manage the actual memory allocation. For memory requirements of less than 64 KB, an application can either use the local heap provided for all Windows CE-based applications or create separate heaps. The kernel also allocates memory to the stack for each new process or thread.

In the OEM Adaptation Layer (OAL), you can customize how your system manages memory in any of the following ways:

Use the kernel memory management functions to allocate and de-allocate virtual memory, use memory on the local heap, create separate heaps, and allocate memory from the stack. Your code can use the unused memory from the static data block that is allocated to load the application. Processes also can use memory-mapped files to share data. For more information, see Memory Management Functions and Memory-mapped Files.

See Also

Migrating from an Open Source Platform to Windows CE | Memory Management Reference | Customizing Memory | Memory Mapping a File

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.