K
kvnsmnsn
Given an object of a Java class, is there some straightforward way to
find out how many bytes of memory it takes up?
In C there exists a <sizeof()> operator, but even if it had a counter-
part in Java (which doesn't appear to be the case) that wouldn't be
exactly what I want because the objects I want to know the sizes of
contain references to objects of other classes, and I need to know the
_total_ bytes taken up by that object, its components, its components'
components, and so on. Can anybody point me to how I can find this
out? Any information would be greatly appreciated.
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_
find out how many bytes of memory it takes up?
In C there exists a <sizeof()> operator, but even if it had a counter-
part in Java (which doesn't appear to be the case) that wouldn't be
exactly what I want because the objects I want to know the sizes of
contain references to objects of other classes, and I need to know the
_total_ bytes taken up by that object, its components, its components'
components, and so on. Can anybody point me to how I can find this
out? Any information would be greatly appreciated.
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_