问题
Now that there isn't a app.config
, how do you set gcAllowVeryLargeObjects to true so that you can allocate big arrays?
回答1:
You can use the corresponding environment variable; just remember to use the COMPlus_
prefix (e.g. COMPlus_gcAllowVeryLargeObjects=1
).
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).
来源:https://stackoverflow.com/questions/37382652/how-do-you-set-gcallowverylargeobjects-in-coreclr