[Q] [AGAIN] Instance Size

Karl Ramberg karl.ramberg at chello.se
Wed Jul 10 17:13:01 UTC 2002


se99011 at fhs-hagenberg.ac.at wrote:
> 
> I posted this once, but nobody answered:
> 
> > I just wondered, can I ask an Object (object) how large it is in memory?
> 
> Am I missing something trivial? Just tell me whether I am too newbie... ;-)

Hmm, I'm not sure if this is the right answer:

Inspect the object.
PrintIt in the inspector:
	Smalltalk spaceForInstancesOf: self class

You can also browse SystemDictionary>>spaceForInstancesOf: to see how
the magic number is 
calculated in this method.

Karl



More information about the Squeak-dev mailing list