Is there any way I can measure the memory pressure caused by a program, and how many times the GC is being executed in background?
Yes, by using the .Net performance counters.
For programmatic access to those, see msdn.microsoft.com/en-us/library/356cx381.aspx.