Hello,

I am doing some profiling under WSAD 5.1 /JDK 1.3 and I would like to know the memory used for each object.

Apparently, the profiling result gives me the real memory of each class: the object itself and the references to the other objects which are included in the class. But what I would like, is not the size of the reference, but the real size of the objects.

With an example, it will be easier:

I have 2 class: Foo1 and Foo2
Foo1 contains a list of 300 Foo2

The WSAD profiling result is:
Class........instance...........real size
Foo1.........1..................10
Foo2.........300................15000

The size of Foo1 is only 10, because the size just includes the reference to the list and not the list.

Is there a way to know the "aggregate size" of the class Foo1:
Class........instance...........agg size
Foo1.........1..................15010
Foo2.........300................15000

Many thanks.

--
Bicnic.