memory foot print of an object

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

memory foot print of an object

Charles A. Monteiro-2
Is there such an animal that can provide me with the total system  
memoryFootPrint of an object i.e. something that would walk down the  
object graph and would need to include determining memory for CPointers etc

e.g. determining memory for an instance of OracleBuffer which holds on to  
CPointers.

tia,

--
Charles A. Monteiro

Reply | Threaded
Open this post in threaded view
|

RE: memory foot print of an object

Steven Kelly
> Is there such an animal that can provide me with the total system  
> memoryFootPrint of an object i.e. something that would walk down the  
> object graph ...

The AT System Analysis parcel can do that:

SystemAnalyzer new simpleWeightForObject: objectToWeigh

Looks like it copes with cycles:

| a |
a := Array with: nil.
a at: 1 put: a.
SystemAnalyzer new simpleWeightForObject: a
"printIt"
16

Unlike Trippy (7.3.1): try inspecting the first three lines there, but
not if you love your image :-). (I could break in with Ctrl-Y after a
few seconds, but YMMV.)

> and would need to include determining memory for
> CPointers etc
>
> e.g. determining memory for an instance of OracleBuffer which
> holds on to CPointers.

Don't know about that bit, but I'm sure you can add it :-)

Steve