• Post Reply Bookmark Topic Watch Topic
  • New Topic

Byte Size of an arraylist?  RSS feed

 
madhoo vavila
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How do I get the byte size of an arraylist?

Thanks
madhoo
 
Ernesto Elias-Nieland
Ranch Hand
Posts: 53
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can't get it. The memory management is totally done by the JVM which alocates memory for your objects and garbage collects them when they are eligible. Why do you need it?

Cheeres,
Ernie
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by madhoo vavila:
Hi,
How do I get the byte size of an arraylist?

Thanks
madhoo


There is no way to get the exact byte size of the object in question. It is JVM dependent. Why do you need this again ?
 
Nilabhra Banerjee
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I also need to know how to get the bytesize of the objects I have created and currently not garbage collected. Objects like Arraylist...

Any suggestion?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But why do you need this ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!