Red Gate forums :: View topic - Finding out what the GC cleared the most?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler 7
ANTS Memory Profiler 7 forum

Finding out what the GC cleared the most?

Search in ANTS Memory Profiler 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
mlaban



Joined: 01 Apr 2011
Posts: 1

PostPosted: Fri Apr 01, 2011 6:42 pm    Post subject: Finding out what the GC cleared the most? Reply with quote

Hello,

I noticed that my app is allocating lots of small value types and that causes the garbage collector to run a bit more than I'd like it to.

Is there a way in the memory profiler to figure out what the collected objects were? I can only figure out what is still in memory.

My app is a game and I'm suspecting the allocations of all those value types during the update/render methods which are run at 60fps, so I can't really make snapshots before and after the methods...

Thanks!
Back to top
View user's profile Send private message
jrg



Joined: 02 Jul 2010
Posts: 13

PostPosted: Mon Apr 04, 2011 11:02 am    Post subject: Using the snapshot API Reply with quote

You could use the snapshot API

http://www.red-gate.com/supportcenter/Content?p=ANTS%20Memory%20Profiler&c=ANTS_Memory_Profiler/help/7.0/amp_snapshot_api.htm

to take a snapshot before and after the function call.

The snapshots would have to be conditional so that they only ran once, to avoid attempting 60 snapshots per second.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6646

PostPosted: Mon Apr 04, 2011 12:05 pm    Post subject: Reply with quote

I take it since you can't take snapshots, you need an alternate way of getting Garbage Collection stats? Maybe Windbg/sos can help?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group