Memory Management for Windows Drivers
Kernel-mode drivers allocate memory for purposes such as storing internal data, buffering data during I/O operations, and sharing memory with other kernel-mode and user-mode components. Driver developers should understand memory management in Windows so that they use allocated memory correctly and efficiently. Windows manages virtual and physical memory, and divides memory into separate user and system address spaces. A driver can specify whether allocated memory supports capabilities such as demand paging, data caching, and instruction execution.
The memory manager is the kernel component that performs the memory management operations in Windows. For more information, see Windows Kernel-Mode Memory Manager.
The memory manager implements a number of kernel-mode support routines that drivers call to allocate and manage memory. For more information, see Memory Allocation and Buffer Management.
The memory-management capabilities of kernel-mode drivers are different from those of user-mode applications. For more information about memory management for applications, see Memory Management.
In this section
- Overview of Windows Memory Space
- Allocating System-Space Memory
- Map Registers
- Mapping Bus-Relative Addresses to Virtual Addresses
- Using the Kernel Stack
- Using Lookaside Lists
- Making Drivers Pageable
- Accessing Read-Only System Memory
- Accessing User-Space Memory
- No-Execute (NX) Nonpaged Pool
- Section Objects and Views
- Using MDLs