File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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]
I agree. Here's the link:
subject: Object Size
It's not a secret anymore!