Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Java in General and the fly likes  Object Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark " Object Size" Watch " Object Size" New topic

Object Size

jaya sudha

Joined: Jun 18, 2004
Posts: 20
How to find the size of memory allocated for an object

Igor Ko
Ranch Hand

Joined: Jun 24, 2002
Posts: 90
It is not very simple, see library from:

Them use introspection, and build tree for all including objects, until
go to primitive type.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Intermediate forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
subject: Object Size