getting memory usage of varaibles

Larry Martell larry.martell at gmail.com
Wed May 3 08:12:44 EDT 2017


On Wed, May 3, 2017 at 12:57 AM, Chris Angelico <rosuav at gmail.com> wrote:
> On Wed, May 3, 2017 at 5:53 AM, Larry Martell <larry.martell at gmail.com> wrote:
>> And I can see it getting larger and larger. But I want to see what it
>> is that is causing this. My thought was to put all the objects in a
>> dict with their sizes and compare them as the program runs and report
>> on the one that are growing. But I can't get the name of the object
>> from gc.get_objects only the id.
>
> Coming right back to the beginning here: What do you expect the name
> of an object to be?

The name of the variable in the program, e.g. sql, db_conn, rows, etc.



More information about the Python-list mailing list