2007-11-05, 03:05 PM
Remember freemem and similar applications? Bah, snake oil!
This procedure forces .NET to free memory from the workingset pool. I went on a witch hunt to find out why my new windows service was consuming 28 Mb of ram on start up with only a few references and a timer. I stumbled upon this which reduced the workingset to 1 Mb and sustained workingset of about 9 Mb. I put a call to it in my timer to run every 15 minutes.
http://west-wind.com/weblog/posts/240.aspx
Obviously, the performance increase isn't perceptable, but I feel better taking this to production without being accused of bloat.
This procedure forces .NET to free memory from the workingset pool. I went on a witch hunt to find out why my new windows service was consuming 28 Mb of ram on start up with only a few references and a timer. I stumbled upon this which reduced the workingset to 1 Mb and sustained workingset of about 9 Mb. I put a call to it in my timer to run every 15 minutes.
http://west-wind.com/weblog/posts/240.aspx
Obviously, the performance increase isn't perceptable, but I feel better taking this to production without being accused of bloat.