Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Object size can also be estimated without java agent using some assumptions about JVM internals (object header size, alignment, pointer size). For the most of popular JVMs such an approach gives precise results, but for some JVMs or envirements environments result can be not so accurate. Examples of tools, that use this such approach: [3], [4], [5].

To calculate object graph size (deep object size) in common case reflection and recursive reference fields traverse must be used, taking into account already visited objects. 

...