views:

126

answers:

1

SandCastle is unable to process our class library because it crashes with an OutOfMemoryException exception during XSL transformation.

What can we do about that, except for the obvious, buy more memory? The problem is that this is our developer machines with 3.3GB memory on a 32-bit OS so basically we either have to upgrade to 64-bit and more memory (which won't happen for a while) or set up a virtual server to do this with lots of memory (which will impact production servers).

I seriously doubt we have the biggest class library in the world that requires help files, so what options do we have? Is there a magic "Do not crash with out of memory errors" setting that we forgot to turn off?

+1  A: 

If you're on 32 bit Windows, your user process will only be able to address 2 GB memory per default (3 GB is run as large address aware). The 2 GB are used for everything in the process, so the .NET runtime, standard libraries, booking and so forth all take their chuck. In my experience that leaves about 1.5 GB for .NET applications on 32 bit.

You can get access to more memory by using the large address aware switch, but it doesn't come for free if you're on 32 bit Windows. Moving to 64 bit Windows will let your 32 bit application access the entire 32 bit address space and thus give you 4 GB addressable space.

I've recently written a blog entry with details about memory usage for .NET applications, but since I blog in Danish, you may not be able to read it. However, if you want to have a look, the link is: http://kodehoved.dk/?p=156

You may also find this MSDN blog post relevant: http://blogs.msdn.com/maoni/archive/2007/05/15/64-bit-vs-32-bit.aspx

Brian Rasmussen
While I will try this, it didn't register with me that we haven't enabled /3GB support for our computers so I'll have to look into doing that. The question is still whether this is just a temporary fix though (assuming it fixes our current problem). Will Sandcastle just use that much memory and there is no way to ask it to not do that?
Lasse V. Karlsen
Sorry, I can't say. My answer is mostly general advice on memory use.
Brian Rasmussen