I have an application that must use a library that I didn\'t write and I don\'t have the power to change it. Basically there is a memory leak, so the long it runs, the more
Have also a look at Process Governer: http://lowleveldesign.wordpress.com/2013/11/21/set-process-memory-limit-with-process-governor/. I wrote this tool to test memory leaks in my applications. The process running with a memory limit will throw OutOfMemory if it exceeds it.
That is a per-process limitation in Windows. Each process gets ~2GB virtual address space (that is what Heap makes use of) in a 32-bit machine. And I am afraid there is not much you can do about it.
Roughly, CLR is able hold upto ~1.6GB of objects in memory. That should be enough for most of the applications. If not, then you need to work on your application.
In my case, I faced a similar problem and then used SqlDataReader to fetch objects in a specified chunk size, process it, compute it, clean it from memory, and then fetch another chunk.
There is also a detailed article on MSDN - Investigating Memory Issues
Hope this would be helpful.