-1

要求 Win 7/Win 10 (BIOS/EFI)。我一直在研究这个,还没有找到方法,故事如下:

在我bcdedit /set IncreaseUserVa 3872用来将用户模式虚拟地址空间设置为 3872MB 的程序中,然后我重新启动。

对于单元测试,我需要检查更改是否使用 C#。经过大量研究,我尝试了以下方法:

  • 这个类似的解决方案在这里。我遇到了一个例外:System.AccessViolationException HResult=0x80004003 Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.我在管理员帐户中以管理员身份运行 VS。
  • 使用Process.GetCurrentProcess().X(有一些内存属性),但那些不是整个系统的。
  • [systemdrive]:/boot 中的 BCD reg 文件包含此数据。在 regedit HKLM/BCD000000 中,我无法在网络上的任何地方找到要查看的 reg 密钥
  • 导入 Microsoft.VisualBasic 并使用 ComputerInfo 类,这个很有希望,但我设置为 3872MB (3.78GB) 并且它恢复为 ~3GB

任何人都可以帮忙吗?在 BCD000000 或其他方式中找到正确的 reg 密钥?

4

1 回答 1

0

弄清楚了。

ComputerInfo myCompInfo = new ComputerInfo(); myCompInfo.TotalVirtualMemory();

BCDEdit 不允许设置超过 3GB 的虚拟地址空间。

于 2018-03-09T20:02:51.907 回答