472,333 Members | 1,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

How to set the max heap size in C#?

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
4 27272
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

"Paul" <pl*****@gmail.comwrote in message
news:11*********************@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
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" <pl*****@gmail.comwrote in message
news:11*********************@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
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. Ar****@Arnold.comwrote in message
news:ef**************@TK2MSFTNGP02.phx.gbl...
>
"Paul" <pl*****@gmail.comwrote in message
news:11*********************@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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Kevin Grigorenko | last post by:
Hello, I couldn't find an obvious answer to this in the FAQ. My basic question, is: Is there any difference in allocating on the heap versus the...
17
by: Jonas Rundberg | last post by:
Hi I just started with c++ and I'm a little bit confused where stuff go... Assume we have a class: class test { private: int arr; };
6
by: Dima | last post by:
How can I know size of avaible memory in heap? For example : .... .... // size = N cout << "Size of Heap = " << SizeOfHeap() << endl; int* i =...
11
by: ganesh.kundapur | last post by:
Hi, Is there any way to get the total heap size allocated to a process in c on linux platform. Regards, Ganesh
5
by: sunny | last post by:
Hi All Is there any way to determine stack and heap size, during runtime. i.e can we predict stack overflow. etc
0
by: Raj | last post by:
We are on a db2 v8.2 (fix 8) with DPF & intra parllelism. Below are sort related configuration settings ...
1
by: wishbone34 | last post by:
Hi, I have a question regarding the use of a couple functions I have for an assignment.. first here is the header file that im trying to use...
7
by: Raman | last post by:
Hi All, Could any one tell me, how can I determine/Change size of heap on per- process basis on Unix based systems. Thanks. Regards
5
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but...
4
by: ggoubb | last post by:
The purpose of the Insert function is to add a new integer in the Heap assuming that it is not already full. If Heap capacity has been reached, it...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.