【发布时间】:2018-08-18 10:30:48
【问题描述】:
要求 Win 7/Win 10 (BIOS/EFI)。我一直在研究这个,还没有找到方法,这是故事:
在一个程序中,我使用bcdedit /set IncreaseUserVa 3872 将用户模式虚拟地址空间设置为 3872MB,然后我重新启动。
对于单元测试,我需要检查更改是否使用 C#。经过大量研究,我尝试了以下方法:
-
This similar solution here。我遇到了一个异常:
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 密钥?
【问题讨论】:
标签: c# virtual-address-space bcdedit bcdstore