C#增加堆大小 - 这可能 [英] C# Increase Heap Size - Is It Possible

查看:184
本文介绍了C#增加堆大小 - 这可能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C#有一个内存不足的异常在一个巨大的文件中读取时

I have an out of memory exception using C# when reading in a massive file

我需要更改代码,但暂时我可以增加堆大小(像我这一点在Java)作为shaort长期修复?

I need to change the code but for the time being can I increase the heap size (like I would in Java) as a shaort term fix?

推荐答案

.NET会自动做到这一点。

.Net does that automatically.

看起来你已经达到了一个内存的.Net程序可以使用它的对象的限制(32位计算机上,这是2个标准或3GB使用/ 3GB启动开关贷Leppie&安培;埃里克利珀的信息)

Looks like you have reached the limit of the memory one .Net process can use for its objects (on 32 bit machine this is 2 standard or 3GB by using the /3GB boot switch. Credits to Leppie & Eric Lippert for the info).

重新考虑你的算法,或者更改了64位的机器可能会帮助

Rethink your algorithm, or perhaps a change to a 64 bit machine might help.

这篇关于C#增加堆大小 - 这可能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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