Re: [Python-Dev] GC Proposal

2008-06-29 Thread Adam Olsen
On Sun, Jun 29, 2008 at 11:49 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> 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 >>> >>>

Re: [Python-Dev] GC Proposal

2008-06-29 Thread Martin v. Löwis
>> 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? > > "delet

Re: [Python-Dev] GC Proposal

2008-06-29 Thread Adam Olsen
On Sun, Jun 29, 2008 at 12:59 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> Looks about equivalent, but "survivors" may mean two different things >> depending on if it removes deleted survivors or not. Splitting that >> up, we get this form: >> >> old <= survivors * 2.0 + deleted * 1.0 > > W

Re: [Python-Dev] GC Proposal

2008-06-28 Thread Martin v. Löwis
> Looks about equivalent, but "survivors" may mean two different things > depending on if it removes deleted survivors or not. Splitting that > up, we get this form: > > old <= survivors * 2.0 + deleted * 1.0 What precisely would be the "deleted" count? If it counts deallocations, is it relevant

Re: [Python-Dev] GC Proposal

2008-06-28 Thread Adam Olsen
On Sat, Jun 28, 2008 at 2:42 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> The effect is similar for the "batch allocation" case, but opposite >> for the "long-running program" case. > > I don't understand. Where is the difference? > >> My proposal can be made equivalent to Martin's proposal

Re: [Python-Dev] GC Proposal

2008-06-28 Thread Martin v. Löwis
> The effect is similar for the "batch allocation" case, but opposite > for the "long-running program" case. I don't understand. Where is the difference? > My proposal can be made equivalent to Martin's proposal by removing > all of its pending traces when an untraced object is deleted. We > cou

Re: [Python-Dev] GC Proposal

2008-06-28 Thread Adam Olsen
On Sat, Jun 28, 2008 at 12:47 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > Adam Olsen gmail.com> writes: >> >> We need two counters: one is the total number of traceable objects >> (those we would inspect if we did a full collection) and a number of >> "pending" trace operations. Every time an

Re: [Python-Dev] GC Proposal

2008-06-28 Thread Martin v. Löwis
> It sounds rather similar to Martin's proposal, except with different > coefficients and slightly different definitions (but the "total number > of traceable objects" should be roughly equal to the number of objects > in the oldest generation, and the "number of pending trace operations" > roughly

Re: [Python-Dev] GC Proposal

2008-06-28 Thread Antoine Pitrou
Adam Olsen gmail.com> writes: > > We need two counters: one is the total number of traceable objects > (those we would inspect if we did a full collection) and a number of > "pending" trace operations. Every time an object is moved into the > last generation, we increase "pending" by two - once

[Python-Dev] GC Proposal

2008-06-26 Thread Adam Olsen
We need two counters: one is the total number of traceable objects (those we would inspect if we did a full collection) and a number of "pending" trace operations. Every time an object is moved into the last generation, we increase "pending" by two - once for itself and once for an older object.