How to set the max heap size in C#?

  • Thread starter Thread starter Paul
  • Start date Start date
P

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
 
Paul said:
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

How big is big?

The heap normally grows as needed, so you rarely have to do anything
about it's size.
 
Paul said:
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#?

..NET doesn't really have the equivalent of the maximum heap sizes in
Java. The CLR will take up as much space as you have virtual memory
(well, up to OS limits), but the garbage collector tries to reclaim
memory appropriately.
 
Back
Top