简体   繁体   English

如何在Windows中使用大页面运行我的应用程序?

[英]How do I run my app with large pages in Windows?

Large pages are available in Windows Server 2003 and Windows Vista . Windows Server 2003Windows Vista中提供大页面。

But how do I enable large pages for my application? 但是,如何为应用程序启用大页面?

Martin's answer is correct on Windows Server 2003: Martin的答案在Windows Server 2003上是正确的:

You will have to assign the "Lock pages in memory" privilege to any user that runs your > application. 您必须将“锁定内存中的页面”特权分配给运行您的应用程序的任何用户。 This includes administrators 这包括管理员

  1. Select Control Panel -> Administrative Tools -> Local Security Policy 选择控制面板->管理工具->本地安全策略
  2. Select Local Policies -> User Rights Assignment 选择本地策略->用户权限分配
  3. Double click "Lock pages in memory", add users and/or groups 双击“锁定页面在内存中”,添加用户和/或组
  4. Reboot the machine 重新启动机器

On Windows Vista you need also make sure that the application is run as Administrator (by right-clicking on the application or the shell and choosing "Run as adminstrator". 在Windows Vista上,您还需要确保该应用程序以管理员身份运行(通过右键单击该应用程序或外壳,然后选择“以管理员身份运行”)。

In addition, it helps to have a freshly booted machine since the large pages can "run out" due to fragmentation of the heap. 此外,由于大堆可能由于堆的碎片而“用完”,这有助于拥有一个刚启动的计算机。

You will have to assign the Lock pages in memory privilege to any user that runs your application. 您必须将“ Lock pages in memory特权分配给运行您的应用程序的任何用户。 This includes administrators. 这包括管理员。

  1. Select Control Panel -> Administrative Tools -> Local Security Policy 选择控制面板->管理工具->本地安全策略
  2. Select Local Policies -> User Rights Assignment 选择本地策略->用户权限分配
  3. Double click "Lock pages in memory", add users and/or groups 双击“锁定页面在内存中”,添加用户和/或组
  4. Reboot the machine 重新启动机器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM