473,395 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 27848
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 stack? If heap or stack implementation is not...
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 = new int; // size = N - sizeof(int) cout << "Size...
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 we believe that it might be related to the OS...
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 attempts to double the current capacity. If capacity...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.