Size of an object in memory?

Fernando Pérez fperez528 at
Mon Nov 12 22:15:05 CET 2001

Is there any way (at runtime, dynamically) to obtain the size in bytes of a 
given object in memory? Since multiple names may be bound to the same object, 
is it possible to obtain the size of the underlying object and a list of  all 
other names bound to it?

I'm writing a runtime object inspector, using the very nice inspect module, 
but inspect doesn't seem to provide this kind of information.

Thanks for any help,


More information about the Python-list mailing list