Re: Memory Profiler for Heap Analysis



On Wed, 13 Jun 2007 14:09:31 +0200, Robert Klemme <shortcutter@xxxxxxxxxxxxxx> wrote:

this exists, how does it properly calculate sizes? How many levels does it follow when counting?
Until it hits a cycle?

If it does not?

Well, then all the better: it's a proper tree and at some point you'll have traversed it completely.

How do you count objects that are referenced by multiple other instances etc.
Add the objects size to both instaces...?

Remember that n is not restricted to 2, could be much higher.

The point you're interested in is the size of a certain object, say A. You go ahead and look at what other objects it points. Say it points to object B. Since A points to B, B's size needs to be added to A's size. It doesn't matter what other objects point to B, for it will always be referenced from A, thus, is part of A no matter what.
On the other hand: I'm looking for things to REMOVE from the program. So, if you would remove A in the above scenario, B would still remain in memory, so it would be misleading.

Oh well. If we continue discussing, we could as well implement it. Are you in ? ;)


DOM is a good candidate. If I were you, I'd create an application object model, throw away the DOM parsing and create a SAX parser which directly creates the model. Just my 0.02 EUR...

I think the things we want to achieve (online validation for example) do require a DOM...

It's just frustrating. I have the heap dump in front of my eyes, I can see all the classes of the DOM, still I can't figure out just how much of the memory they cost in total.

Moritz
.



Relevant Pages

  • Re: How does "new" work in a loop?
    ... garbage collection. ... memory that is not being used. ... It's not a matter of the reference being removed. ... Since it was a production system I used great ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: big-little
    ... (and if they do matter for a given piece of software, ... That is exactly like saying that, if all memory actions are atomic, ... this often means locking/unlocking for some misc operations, such as looking/fetching up fields or methods. ... if a person really insists on strict determinism and so on, then they can probably just write only single-threaded code. ...
    (comp.arch)
  • Re: NBC special " The Mysterious Origins of Man"
    ...  Did matter build the empire State ... It should be referred to as memory, not data, a computer ... Although we can hold the brain in our hands and take it apart neuron ... stores data without a body. ...
    (rec.music.classical.guitar)
  • Re: big-little
    ... (and if they do matter for a given piece of software, ... That is exactly like saying that, if all memory actions are atomic, ... another subtle issue though is that many C compilers are optimized for single-threaded code, and so will cache variables in registers. ... so that unrelated threads will not normally be working on the same data at the same time (except where unavoidable, generally in areas related to the language/VM run-times or similar). ...
    (comp.arch)
  • Re: Congrats Jim Furyk
    ... continues to try and retry folks for mistakes, bad behavior, etc. ... Vijay thing - and I don't mean this thread, I mean every thread when it ... There's no trial, nor retrial, just the matter of reputation. ... If his/her name came up years later, that could well be the memory ...
    (rec.sport.golf)