[Patches] [ python-Patches-414492 ] adds a gc.get_generation function
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 05 Jun 2001 23:45:02 -0700
Patches item #414492, was updated on 2001-04-07 00:33
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=414492&group_id=5470
Category: core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gregory P. Smith (greg)
Assigned to: Neil Schemenauer (nascheme)
Summary: adds a gc.get_generation function
Initial Comment:
gc.get_generation(num) added by this patch allows you
to get a
list of all objects in a given garbage collector
generation.
I wrote this while trying to debug a memory leak so
that I could peek at what types of objects were
remaining allocated but never freed.
Looking through the patches I see another similarish
patch that allow for searching the collection lists for
references to a particular thing or set of things.
interesting.
Is it useful? Yes and no. I still haven't found the
memory leak. But I know what objects are consuming it
so I can narrow my search through to code to find how
they are remaining referenced.
as a side note, there's not much point in the
generation number parameter to this method, 2 is the
only generation really worth examining.
This or something like it would be nice to see in a
future python gc module as a debugging aid.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2001-06-05 23:45
Message:
Logged In: YES
user_id=21627
I still would like to see my gc.getreferents patch
applied, which offers a similar debugging aid.
However, since this offers a somewhat orthogonal
functionality, and is a quite short patch, I recommend to
approve it.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=414492&group_id=5470