如何在coreCLR中设置gcAllowVeryLargeObjects? [英] How do you set gcAllowVeryLargeObjects in coreCLR?
本文介绍了如何在coreCLR中设置gcAllowVeryLargeObjects?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
现在没有app.config
,如何将gcAllowVeryLargeObjects设置为true,以便可以分配大数组?
Now that there isn't a app.config
, how do you set gcAllowVeryLargeObjects to true so that you can allocate big arrays?
推荐答案
You can use the corresponding environment variable; just remember to use the COMPlus_
prefix (e.g. COMPlus_gcAllowVeryLargeObjects=1
).
您可以在运行dotnet run之前从命令行进行设置,也可以将其添加到Visual Studio中项目属性的环境变量部分(或可能添加注册表项).
You can either set this up from the command line before running dotnet run, or add it on the environment variables section of the project's properties within Visual Studio (or probably add a registry entry).
这篇关于如何在coreCLR中设置gcAllowVeryLargeObjects?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文