My program promotes memory in Gen2 at a very high speed (about 1 MB / s), and this leads to a performance hit when collecting the Gen2 collection. Every attempt I made to understand which objects were advanced failed, mainly due to the fact that when I opened 2 dumps in windbg, the memory from which the Gen2 size was increased was marked as βFreeβ. This made me suspect that the Pinned objects were causing the problem, but perfmon statistics show that the number of Pinned objects is very low (around 2-4).
What I'm trying to try now is to somehow determine which objects will be distributed to Gen2 at runtime. Is there any way to do this?
galbarm
source share