I am trying to analyze our .NET web application and I noticed that when I click the "Take Memory Snapshot" button the app's Private Working Set drops about 30% to 50% immediately, before the snapshot is completed. Is this expected behavior?
Comments
2 comments
-
Hi and thanks for your post!
This behavior can be expected as the memory profiler forces a garbage collection and runs all finalizers before each snapshot. (It does this so that the results focus on objects that are persisting in memory rather than objects that can actually be picked up by the GC.)
I hope this info helps! -
Is there any way to prevent this from happening? The full GC hides any visibility into the objects that were created before the GC.
Add comment
Please sign in to leave a comment.