How to measure memory footprint of Python objects?

Heikki Toivonen heikki at osafoundation.org
Thu Sep 21 04:32:57 CEST 2006


Neagu, Adrian wrote:
> I try to solve the following problem: I have a python program that takes a
> lot of memory (>hundred Mb). I made an improvement (I hope) and I want to
> measure the gain (if possible on several platforms). I would like to be able
> to print the max memory taken during the run upon exiting my Python program
> (like I already do for the time taken to run).

You could try PySizer: http://pysizer.8325.org/

-- 
  Heikki Toivonen



More information about the Python-list mailing list