on 05-08-2008 2:48 PM
Hi all,
I have difficulties to understand how "Retained Heap" is calculated in the 'outgoing references' view.
I have for example object
com.wuerth.phoenix.bcserver.base.versant.UpdateSession @ 0x7c780f00
for which SAP Memoryanalyzer shows a retained Heap of 77.392 bytes.
In the same view for 0x7c780f00 there is shown a outgoing (hard) reference to
com.versant.trans.TransSession @ 0x7c787d38
for which SAP Memoryanalyzer surprisingly shows a retained Heap of 191.096 bytes !
191.096 > 77.392 so it seems that SAP Memoryanalyzer
isn't considering all outgoing references when calculating the "Retained Heap" which is confusing me.
Any explanation is welcome
thanks
Guenther Demetz
Hi Guenther,
in your case, TransSession probably is also reference by other objects. So if the UpdateSession is garbage collected, the TransSession still stays around. And that's why the TransSession is not accounted to the retained heap of the UpdateSession.
Another example is a char array which is referenced by 2 strings. Both have outgoing references to the char array, but the size of the char array cannot be assigned to one of them.
Run "path 2 gc roots" on the TransSession who is keeping this object alive.
Andreas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.