Test Run: Stress Testing. -- MSDN Magazine, May 2006
This article discusses a program that allows you to stress test an application by running a secondary app that eats up memory on that machine.
The code presented shows how to get system memory information using PInvoke. In addition it also has code that shows you how to colorize code being sent to the console.