364,033 Members | 4844 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

How to set the max heap size in C#?

Paul
P: n/a
Paul
Dear all,

I am writing an application which constructing a fairly big tree for
some financial pricing application. How can I increase the heap size
of the .NET runtime environment?

I have tried doing it in Java before which I can set use the /mx flag
in the java runtime. How to do equivalent thing in .NET or C#?

Thanks a lot.

Paul

Jul 26 '07 #1
Share this Question
Share on Google+
4 Replies


Paul
P: n/a
Paul
On Jul 26, 1:08 pm, Paul <plch...@gmail.comwrote:
Dear all,
>
I am writing an application which constructing a fairly big tree for
some financial pricing application. How can I increase the heap size
of the .NET runtime environment?
>
I have tried doing it in Java before which I can set use the /mx flag
in the java runtime. How to do equivalent thing in .NET or C#?
>
Thanks a lot.
>
Paul
sorry reposted the same msg

Jul 26 '07 #2

Mr. Arnold
P: n/a
Mr. Arnold

"Paul" <plchung@gmail.comwrote in message
news:1185426495.345361.25690@m37g2000prh.googlegro ups.com...
Dear all,
>
I am writing an application which constructing a fairly big tree for
some financial pricing application. How can I increase the heap size
of the .NET runtime environment?
>
I have tried doing it in Java before which I can set use the /mx flag
in the java runtime. How to do equivalent thing in .NET or C#?
>
The info in the link may or may not provide you with a workaround.

http://www.codeproject.com/csharp/La...___Trouble.asp


Jul 26 '07 #3

Chris Mullins [MVP]
P: n/a
Chris Mullins [MVP]
The .Net heap will grow, as needed, to consume all available memory. There's
no need to manually adjust it.

On x86, you'll be limited about 1.5gb, regarless of how much memory you have
on your system.

On x64 or IA64, the limits are much, much higher.

If you're doing "Big" calculations, and memory is a concern, just run under
x64 and make sure your code is set to "Any CPU". This does mean you need x64
hardware, and a 64-bit O/S installed (XP x64, Vista x64, Windows 2003 x64).

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"Paul" <plchung@gmail.comwrote in message
news:1185426495.345361.25690@m37g2000prh.googlegro ups.com...
Dear all,
>
I am writing an application which constructing a fairly big tree for
some financial pricing application. How can I increase the heap size
of the .NET runtime environment?
>
I have tried doing it in Java before which I can set use the /mx flag
in the java runtime. How to do equivalent thing in .NET or C#?
>
Thanks a lot.
>
Paul
>

Jul 26 '07 #4

Chris Mullins [MVP]
P: n/a
Chris Mullins [MVP]
I don't think he's hitting LOH issues.

When doing financial calcs, I think the common scenario is to have a huge
amount of very small datapoints all loaded into a decision tree. This
usually means it's the standard Managed Heap, and his stuff will just end up
in Gen2 pretty quick.

Certianly though, without more data, it could go either way.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"Mr. Arnold" <MR. Arnold@Arnold.comwrote in message
news:efMuc30zHHA.3788@TK2MSFTNGP02.phx.gbl...
>
"Paul" <plchung@gmail.comwrote in message
news:1185426495.345361.25690@m37g2000prh.googlegro ups.com...
>Dear all,
>>
>I am writing an application which constructing a fairly big tree for
>some financial pricing application. How can I increase the heap size
>of the .NET runtime environment?
>>
>I have tried doing it in Java before which I can set use the /mx flag
>in the java runtime. How to do equivalent thing in .NET or C#?
>>
>
The info in the link may or may not provide you with a workaround.
>
http://www.codeproject.com/csharp/La...___Trouble.asp
>
>

Jul 26 '07 #5

Post your reply

Help answer this question



Didn't find the answer to your C# / C Sharp question?

You can also browse similar questions: C# / C Sharp