如何在C#中使用大量内存? [英] How to use a huge memory in C#?
本文介绍了如何在C#中使用大量内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的系统有4GB内存,我在C#中的程序真的是内存消耗的b $ b。而且我注意到当我使用的内存超过2GB时我将获得一个例外。
如何解决这个问题?非常感谢
My system has 4GB memory and My program in C# is really memory
consuming. and I noticed that when the memory I used is more than 2GB I
will get an exception.
How to solve this? thanks a lot
推荐答案
这是一个Windows问题而不是C#问题。
中有2GB的进程限制
windows ..
见
http://msdn.microsoft.com/library/de...netchapt17.asp
搜索/ 3 gb以获取更大的说明。
欢呼,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
" fAnSKyer / C#newbie" < fa ****** @ gmail.com写信息
新闻:11 ********************** @ m7g2000cwm .googlegro ups.com ...
That is a windows issue not a C# issue ..There is a 2gb process limit in
windows ..
see
http://msdn.microsoft.com/library/de...netchapt17.asp
search for /3 gb for instructions for how to make this larger.
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
"fAnSKyer/C# newbie" <fa******@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
我的系统有4GB内存,而我在C#中的程序实际上是内存消耗的b $ b。而且我注意到当我使用的内存超过2GB时我将获得一个例外。
如何解决这个问题?非常感谢
My system has 4GB memory and My program in C# is really memory
consuming. and I noticed that when the memory I used is more than 2GB I
will get an exception.
How to solve this? thanks a lot
" fAnSKyer / C#newbie" < fa ****** @ gmail.com写信息
新闻:11 ********************** @ m7g2000cwm .googlegro ups.com ...
|我的系统有4GB内存,我在C#中的程序真的是内存
|耗时。而且我注意到当我使用的内存超过2GB时我会支付
|会有例外。
|
|怎么解决这个?非常感谢
|
为什么你的程序会占用那么多内存?是设计还是你在追逐一个bug?
如果它是第一个,你将不得不改变你的设计或转向64位操作系统,
如果它是一个错误,你将需要描述你的应用程序。
Willy。
"fAnSKyer/C# newbie" <fa******@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
| My system has 4GB memory and My program in C# is really memory
| consuming. and I noticed that when the memory I used is more than 2GB I
| will get an exception.
|
| How to solve this? thanks a lot
|
Why does your program uses that much memory? Is it by design or are you
chasing a bug?
If it''s the first, you''ll have to change your design or move to a 64 bit OS,
if it''s a bug, you will have to profile your application.
Willy.
>
我很确定.Net不尊重/ 3gb开关。
我一段时间没看好,但我知道我们做得很好一点点的性能
在32位的时间内进行了调整,对此非常了解。
Fortunatly 64位硬件出现了,生活很好。我喜欢分配
20 + gb的内存! :)
-
Chris Mullins,MCSD.NET,MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
" Greg杨" < dr ******************* @ hotmail.comwrote in message
news:eV *********** *** @ TK2MSFTNGP05.phx.gbl ...
I''m pretty sure .Net doesn''t respects the /3gb switch.
I haven''t looked in a while, but I know we did quite a bit of performance
tuning in 32-bit land a while back and were very crabby about this.
Fortunatly 64-bit hardware came along, and life was good. I love allocating
20+gb of memory! :)
--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
"Greg Young" <dr*******************@hotmail.comwrote in message
news:eV**************@TK2MSFTNGP05.phx.gbl...
这是一个Windows问题,而不是C#问题。
中有2GB的进程限制
windows ..
见
http://msdn.microsoft.com/library/de...netchapt17.asp
搜索/ 3 gb以获取更大的说明。
欢呼,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
" fAnSKyer / C#newbie" < fa ****** @ gmail.com写信息
新闻:11 ********************** @ m7g2000cwm .googlegro ups.com ...
That is a windows issue not a C# issue ..There is a 2gb process limit in
windows ..
see
http://msdn.microsoft.com/library/de...netchapt17.asp
search for /3 gb for instructions for how to make this larger.
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
"fAnSKyer/C# newbie" <fa******@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
>我的系统有4GB内存,我在C#中的程序真的很耗油。而且我注意到当我使用的内存超过2GB时我会得到一个例外。
如何解决这个问题?非常感谢
>My system has 4GB memory and My program in C# is really memory
consuming. and I noticed that when the memory I used is more than 2GB I
will get an exception.
How to solve this? thanks a lot
这篇关于如何在C#中使用大量内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文