Summarizing memory use
pacquets at newsguy.com
pacquets at newsguy.com
Fri May 2 16:30:44 EDT 2003
I asked a question a few days ago about "reduced memory Python," and got a good
answer back on "Pippy without the PalmOS dependencies." Thanks for that one;
I've been making good progress with that.
There was a second part to the message which no one addressed, though, so I'd
like to ask that again:
*** how can I get a summary of what is consuming memory and how much they're
using, in a running interpreter? Has anyone done such a script?
Using one of the scripts for "detecting memory leaks" I was able to get
reference counts for all the objects, and it breaks them down by the Type of
each one (string, list, etc.) But this isn't really too helpful -- what I want
is some sort of "charge back" to the top-level objects. I realize this is
impossible in the general case of an object graph, but if all I do is
import os
os.listdir('.')
I ought to be able to see where the 850K of memory was going, somehow or other.
Any ideas on that?
More information about the Python-list
mailing list