我正在研究一个关于排序列表的小程序。现在,我需要一个需要超过2GB RAM的阵列。在我的研究期间,我找到了这个属性,但我不知道在哪里设置它。我正在使用Mono。
答案 0 :(得分:8)
对于非常大的ArrayList对象,通过在运行时环境中将gcAllowVeryLargeObjects配置元素的enabled属性设置为true,可以将64位系统上的最大容量增加到20亿个元素。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<gcAllowVeryLargeObjects enabled="true" />
</runtime>
</configuration>
mono64 --config MyCustomApp.config Foobar.exe