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

时间:2020-03-05 18:46:19  来源:igfitidea点击:

Windows Server 2003和Windows Vista中提供大页面。

但是,如何为应用程序启用大页面?

解决方案

回答

我们必须将"锁定内存中的页面"特权分配给运行应用程序的任何用户。这包括管理员。

  • 选择控制面板->管理工具->本地安全策略
  • 选择本地策略->用户权限分配
  • 双击"锁定页面在内存中",添加用户和/或者组
  • 重新启动机器

回答

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
  
  
  Select Control Panel -> Administrative Tools -> Local Security Policy
  Select Local Policies -> User Rights Assignment
  Double click "Lock pages in memory", add users and/or groups
  Reboot the machine

在Windows Vista上,我们还需要确保该应用程序以管理员身份运行(通过右键单击该应用程序或者外壳,然后选择"以管理员身份运行")。

另外,由于大堆可能由于堆的碎片而"用完",这有助于拥有新启动的计算机。