best way to discover this process's current memory usage, cross-platform?

Alex Martelli aleax at mail.comcast.net
Mon Nov 14 23:31:10 EST 2005


Steven D'Aprano <steve at REMOVEMEcyber.com.au> wrote:

> Not sure if I should start a new thread or not, but 
> since this is closely related, I'll just leave it as is.
> 
> Alex Martelli wrote:
> 
> > Having fixed a memory leak (not the leak of a Python reference, some
> > other stuff I wasn't properly freeing in certain cases) in a C-coded
> > extension I maintain, I need a way to test that the leak is indeed
> > fixed.
> 
> I would like to investigate how much memory is used by 
> Python objects. My motive is 98% pure intellectual 
> curiosity and 2% optimization.

I believe that's the purpose of the PySizer project (one of the "Google
Summer of Code" projects), which was recently announced on this group
(I'm sure any search engine will be able to direct you to it, anyway).

I have not checked it out, because my purpose is different -- mine is
not a Python-related leak at all, just a leak within C code (which
happens coincidentally to be a Python extension module).


Alex



More information about the Python-list mailing list