.Net数组大小的限制 [英] The limitation on the size of .Net array

查看:26
本文介绍了.Net数组大小的限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

听说.Net Array 的大小有硬性限制.据说可以分配给 Array 对象的任何单个实例的最大内存量(不管它是 int[], double[] 或您自己的数组)为 2GB.不,如果你有一台 64 位机器,2GB 的限制仍然存在.

I heard that there is a hard limit on the size of .Net Array. It is said that the maximum amount of memory that can be allocated to any single instance of an Array object ( regardless of whether it's int[], double[] or your own array) is 2GB. And no, if you have a 64 bit machine, the 2GB limit is still there.

我不确定我的印象是否正确.任何人都可以确认吗?

I'm not sure whether my impression is correct or not. Anyone can confirm?

推荐答案

这是正确的.任何单个对象都不能大于 2 GB.

与 32 位 Windows 操作一样系统,有 2GB 的限制您可以同时创建的对象的大小运行 64 位托管应用程序在 64 位 Windows 操作系统上.

As with 32-bit Windows operating systems, there is a 2GB limit on the size of an object you can create while running a 64-bit managed application on a 64-bit Windows operating system.

这个问题有额外的细节和一些有用的链接:在 CLR 4.0 中单个对象的大小仍然限制为 2 GB?

This question has additional details and some useful links: Single objects still limited to 2 GB in size in CLR 4.0?

这篇关于.Net数组大小的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆