[Python-Dev] GC Proposal (original) (raw)
Adam Olsen rhamph at gmail.com
Sun Jun 29 20:49:41 CEST 2008
- Previous message: [Python-Dev] GC Proposal
- Next message: [Python-Dev] deepcopy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Jun 29, 2008 at 11:49 AM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
What precisely would be the "deleted" count? If it counts deallocations, is it relevant what generation the deallocated object was from? If so, how do you determine the generation? If not, wouldn't
while 1: x=[] trigger a full garbage collection fairly quickly? "deleted" means deallocated survivors. So when an object gets deallocated, how do you find out whether it survived a middle collection?
Reusing gc_refs for another flag.
I could imagine wanting to move survivors and deleted up to the first generation, to give a stronger guarantee of how often it'd run, but that'd require a much smaller deleted factor. This I don't understand. What is the first generation? Generation 0 (i.e. the youngest objects)? Why would you want to move objects surviving a garbage collection back to the youngest generation? That totally defeats the purpose of generational garbage collection. Also, why would you want to move deleted objects anywhere? Their storage is reclaimed, and they don't occur in any list of objects.
Sorry, really poor wording on my part. I meant to move the counters, so that even the first generation qualifies as a "survivor", and thus contributes to the "deleted" count.
-- Adam Olsen, aka Rhamphoryncus
- Previous message: [Python-Dev] GC Proposal
- Next message: [Python-Dev] deepcopy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]