现在既然没有一个app.config
,如何将 gcAllowVeryLargeObjects 设置为 true 以便可以分配大数组?
您可以使用相应的环境变量 https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/clr-configuration-knobs.md#environmentregistry-configuration-knobs;只需记住使用COMPlus_
前缀(例如COMPlus_gcAllowVeryLargeObjects=1
).
您可以在运行 dotnet run 之前从命令行进行设置,也可以将其添加到 Visual Studio 中项目属性的环境变量部分(或者可能添加注册表项)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)