Thursday, August 16, 2012

How to set the max heap size in C#?

I had this basic question  How to set the max heap size in C#? which got resolved by a link shared by my colleague.

"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, regardless 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)."


No comments:

Post a Comment