开发者

How can I allocate more than 2GB of memory to a process in Windows?

I am running a program that builds a very l开发者_如何学Carge object, and I would greatly benefit from allocating more than 2GB of memory to this process. Thanks in advance.


You cannot allocate a single object (or an array) that is greater than 2GB, this is a CLR limitation. You'll have to split up the object into pieces.


.NET Framework 4.5 allows creating arrays larger than 2GB on 64 bit platforms. This feature is not on by default, it has to be enabled via config file using the gcAllowVeryLargeObjects element.

http://msdn.microsoft.com/en-us/library/hh285054(v=vs.110).aspx


You appear to be referring to the 2gb limit on virtual memory in 32 bit Windows. You can't get around this limit on a 32 bit system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜