Memory limitations in a 64-bit .Net application?

后端 未结 2 644
野性不改
野性不改 2020-12-03 17:25

On my laptop, running 64 bit Windows 7 and with 2 Gb of free memory (as reported by Task Manager), I\'m able to do:

var x = new Dictionary

        
2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-03 17:35

    Update: The 2Gb single-object memory limit has been lifted on 64 bit with the release of .NET 4.5.

    You'll need to set gcAllowVeryLargeObjects in your app.config.

    The maximum number of elements in an array is still 2^32-1, though.

    See Single objects still limited to 2 GB in size in CLR 4.0? for more details.

提交回复
热议问题