What are the challenges you face when working across database platforms? Take the survey

Is is possible to dump an instance with all of its children?

xiardxiard Posts: 2
edited November 16, 2015 5:30AM in ANTS Memory Profiler 8
I have a case where running my program in one configuration produces objects that can consume more memory than they do in a different configuration. I would like to compare the two instances to figure out why one uses more memory than the other. This is based on looking at the "Size with children" in Memory Profile 8.

My plan right now is to recursively walk the objects using reflection, calculating the size of primitive properties and recursing into reference properties. I would want to use the distance from the GC root, the way Mem Profiler does, to determine what is a child. I'll write all of that to a text file, and then compare the text files for the two configurations.

And as I start doing that, it occurs to me that it would be a whole lot easier if Memory Profile already had a way to dump that information to a file. It clearly already knows the information I'm looking for, and is presumably doing something similar to do the calculation. Is there any way to access that information or dump a detailed report of what an instance is referencing?


Sign In or Register to comment.