admin管理员组文章数量:1394099
I have struct as following
public struct Data
{
public readonly long Start;
public readonly long End;
public Data(long start, long end)
{
Start = start;
End = end;
}
}
Data[] dataRange = new Data[150000000]; // here thrown "array dimensions exceeded supported range" exceptions.
Array declaration supported only up to a length of 134217724. I assume 2GB is still limited even though it has gcAllowVeryLargeObjects enabled.
The same array is working fine with my separate ConsoleApplication whereas not working in Asp project.
I have struct as following
public struct Data
{
public readonly long Start;
public readonly long End;
public Data(long start, long end)
{
Start = start;
End = end;
}
}
Data[] dataRange = new Data[150000000]; // here thrown "array dimensions exceeded supported range" exceptions.
Array declaration supported only up to a length of 134217724. I assume 2GB is still limited even though it has gcAllowVeryLargeObjects enabled.
The same array is working fine with my separate ConsoleApplication whereas not working in Asp project.
Share Improve this question asked Mar 13 at 9:35 Gowtham DharmarajanGowtham Dharmarajan 2343 silver badges17 bronze badges 5 |1 Answer
Reset to default 0For Asp web sites, we need to add gcallowverylargeobjects key in the C:\Windows\
Microsoft.NET
\Framework64\v4.0.30319\Config\machine.config
file to <runtime> section. web.config is not enough.
版权声明:本文标题:gcAllowVeryLargeObjects is not effective for using more than 2GB in an array in C# Asp.NET - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744710717a2621112.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
Array.MaxLength
? – JonasH Commented Mar 13 at 10:52