Windows Kernel Memory Residency Locks in Registry
This article explains where the Windows Registry stores active configurations for system-wide kernel physical memory residency locks and related paging controls. In Windows, kernel-mode components, drivers, and user-space allocations utilize specific registry keys to dictate whether memory pages must remain locked in physical RAM or can be paged out to disk. Below are the precise registry paths, primary values, and configuration behaviors governing these memory residency locks.
Primary Registry Location
The active configuration for kernel physical memory residency and system-wide paging policies is stored in the following registry path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Because CurrentControlSet points dynamically to the
active control set used during the current boot session, modifications
made here directly target the active runtime profile for the operating
system.
Key Values Governing Memory Residency
Within the Memory Management key, several values dictate
how physical memory is locked and managed:
- DisablePagingExecutive (REG_DWORD):
- 0 (Default): Kernel-mode drivers and system executive code can be paged out to disk when system memory is low.
- 1: Forces kernel-mode drivers and system code to remain locked in physical memory (RAM), preventing them from ever being paged to the pagefile. This acts as the primary system-wide residency lock for the Windows kernel executive.
- LockPagesLimit (REG_DWORD):
- Used primarily in older configurations or specialized enterprise
setups to establish a system-wide upper ceiling on the number of
physical pages that user-mode applications or drivers can lock
simultaneously using APIs such as
VirtualLockor Address Windowing Extensions (AWE).
- Used primarily in older configurations or specialized enterprise
setups to establish a system-wide upper ceiling on the number of
physical pages that user-mode applications or drivers can lock
simultaneously using APIs such as
- NonPagedPoolSize (REG_DWORD):
- Configures the maximum size of the non-paged pool. Memory allocated
in the non-paged pool is guaranteed to reside in physical memory at all
times and cannot be paged out. Setting this to
0allows Windows to calculate the limit dynamically based on total installed RAM.
- Configures the maximum size of the non-paged pool. Memory allocated
in the non-paged pool is guaranteed to reside in physical memory at all
times and cannot be paged out. Setting this to
- LargePageMinimum (REG_DWORD):
- Defines the minimum physical memory threshold required before large page support is granted for locking contiguous physical address spaces.
Application of Changes
Because these parameters govern low-level kernel initialization and hardware memory management unit (MMU) behavior, modifications made via Regedit do not apply immediately. A complete system restart is required for the kernel executive to read the updated registry values during the boot process.