473,412 Members | 2,075 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,412 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 27855
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.