Does anyone know of a dll to defragment memory for a Windows 2003 server?
Here's the background: We have a .net ecommerce site that uses a pre-made framework for most of the heavy lifting. The website occasionally gets out of memory exceptions when trying to allocate memory when adding objects to the cache. It mostly happens when the framework tries to add large-ish datasets to the cache.
I understand that when you try to add something to the cache it needs to use contingious memory to add the object, if it can't find a big enough chunk of memory, you'll get an out-of memory exception.
The server often gets this problem when IIS is consuming 600MB+ of memory already and needs 10 or 20 MB more. The server has 4GB of memory so IIS should be able to use 2GB, but I think it's these large objects that are having a problem find a place to fit. So my hacky work-around is to maybe try to catch the exception, run a quick RAM defrag, and continue.
I know it would be best to use smaller objects, but I really don't want to have to reverse-engineer the framework to replace parts of the caching code.
Cheers, Lance