.NET object size limit

后端 未结 3 1628
被撕碎了的回忆
被撕碎了的回忆 2020-12-03 19:10

It seems there is a 2 GB size limit for objects in .NET: How to run Fsi.exe in 64 Bits?

Is there a work around this? I would like to load a very large float array (10

3条回答
  •  执笔经年
    2020-12-03 19:30

    .NET limits any object to max 2 GB even on 64 bit platforms. You can create your own data type, that uses multiple objects to store more data, thus getting around the 2 GB limit of a single object. For instance a List would allow you to store more than 2 GB, but you would have to write the necessary plumbing code to make it behave similar to a single, large array.

    You may also want to check this question.

提交回复
热议问题