We are getting OutOfMemoryException in our Asp.Net WebService (on a 32 bit machine) and while analyzing the problem we found that when we release some memory in .Net (and call GC just to be sure it is collected), the "Process/Private Bytes" counter
of the aspnet_wp goes down, but the "Process/Virtual Bytes" does not.
Here is a simple test method: It allocates blocks of 10MB until all the memory is filled. Then it releases everything and finally allocates a 100MB block. (The sleep statements are there so you can observe memory usage in performance monitor)
public void MemFragmentationTest()
const int allocSize = 10000000; // 10 MB
List<byte> buffers = new List<byte>();
View Complete Post