We\'re seeing lots of virtual memory fragmentation and out of memory errors and then it hits the 3GB limit.
The compilation debug is set to true in the web.config bu
It absolutely could affect memory, just take a look at some of the perfmon counters and run a comparison with both configurations.
If your site has a lot of files I would be more concerned with disk io in the asp.net temp folder.
Couple Questions...
Why not utilize multiple configurations?
Web.Debug.Config - Have debugging turned on Web.UAT.Config - Whatever your preference Web.Release.Config - Have Debugging turned off
This way you can minimize regression configuration errors like a developer checking a web.config in with debug="true"