• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Size

 
jaya sudha
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to find the size of memory allocated for an object
 
Igor Ko
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not very simple, see library from:

http://www.javaworld.com/javaworld/javaqa/2003-12/02-qa-1226-sizeof.html

Them use introspection, and build tree for all including objects, until
go to primitive type.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Intermediate forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic