Tracking which objects get garbage collected a lot
NickWaanders
Posts: 8
Hi,
I just downloaded your profiler (evaluation), and I've been playing with it a bit.
Currently our biggest goal is to (next to) eliminate all object allocation in our C# code (use pools for everything, etc). I've done a memory profile, but it seems to only give me objects that are currently in memory. I'd like to see the objects that have been collected in between two snapshots, or something of the sorts. Is this possible?
The current method I used is to force a GC, then immediately after do a snapshot, and then looking at the age of objects, assuming all the age 0 objects are the temporary allocations. This works 'ok', but not great (and I'm not even 100% sure it's correct.. )
Cheers,
Nick
I just downloaded your profiler (evaluation), and I've been playing with it a bit.
Currently our biggest goal is to (next to) eliminate all object allocation in our C# code (use pools for everything, etc). I've done a memory profile, but it seems to only give me objects that are currently in memory. I'd like to see the objects that have been collected in between two snapshots, or something of the sorts. Is this possible?
The current method I used is to force a GC, then immediately after do a snapshot, and then looking at the age of objects, assuming all the age 0 objects are the temporary allocations. This works 'ok', but not great (and I'm not even 100% sure it's correct.. )
Cheers,
Nick
Comments
These sound like the kind of measures you are after.
Hope it helps,
Stephen
Nick
As a suggestion to the devs: It would be great it ANTS 4 could somehow save the column setup so that I don't have to keep adding the 'Removed Count' column every time I do a new memory profile.
EDIT: duh, ignore that. Objects with live count 0 show up as well...
Cheers,
Nick