大网数据广告活动
性能与资源

Large-Page Support

· 52CE 我爱测

Large-page support enables server applications to establish large-page memory regions, which is particularly useful on 64-bit Windows.

Large-page support enables server applications to establish large-page memory regions, which is particularly useful on 64-bit Windows. Each large-page translation uses a single translation buffer inside the CPU. The size of this buffer is typically three orders of magnitude larger than the native page size; this increases the efficiency of the translation buffer, which can increase performance for frequently accessed memory.

The following procedure describes how to use large-page support.

To use large-page support

  1. Obtain the SeLockMemoryPrivilege privilege by calling the AdjustTokenPrivileges function. For more information, see Assigning Privileges to an Account and Changing Privileges in a Token.
  2. Retrieve the minimum large-page size by calling the GetLargePageMinimum function.
  3. Include the MEM_LARGE_PAGES value when calling the VirtualAlloc function. The size and alignment must be a multiple of the large-page minimum.

When writing applications that use large-page memory, keep the following considerations in mind:

  • Large-page memory regions may be difficult to obtain after the system has been running for a long time because the physical space for each large page must be contiguous, but the memory may have become fragmented. Allocating large pages under these conditions can significantly affect system performance. Therefore, applications should avoid making repeated large-page allocations and instead allocate all large pages one time, at startup.
  • The memory is always read/write and nonpageable (always resident in physical memory).
  • The memory is part of the process private bytes but not part of the working set, because the working set by definition contains only pageable memory.
  • Large-page allocations are not subject to job limits.
  • Large-page memory must be reserved and committed as a single operation. In other words, large pages cannot be used to commit a previously reserved range of memory.
  • WOW64 on Intel Itanium-based systems does not support 32-bit applications that use this feature. The applications should be recompiled as native 64-bit applications.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。