How to measure memory footprint of Python objects?

AdrianNg3 adrian.neagu at
Wed Sep 20 14:43:37 CEST 2006

Paul Rubin wrote:
> See the docs for the gc module.

This is the first place I've checked. I see no useful info there about
the actual size of the objects (bytes occupied in memeory).

The closest thing to what I need is get_objects( ). Then I have to go
over the list
and do something with the objects. Wouldn't that be too slow?

Thanks anyway,

More information about the Python-list mailing list