The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

my experience

Posted by kamesh on August 04, 2001 at 8:24 AM

> Hi,

> I have an object of class java.util.List. now this object conatains information in the form of an array of other objects. I need to know the size of this main List object in terms of bytes. Please help me in finding this size.

> Thankfully,
> Tanu.


Hi

I had tried using Runtime.totalMemory () and freeMemory() functions. I calculate the memory before & after creation of objects and computing the size from the difference. Unfortunately, that is giving me weird figs. Sory, hope u got an idea.

mail me if you got a solution

Thanx
kamesh




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us