Re: [Python-Dev] refleaks and caches

2008-01-28 Thread Thomas Wouters
On Jan 27, 2008 6:08 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Brett Cannon wrote: > > Ignoring whether this is the right thing to do, should this be in sys or > in gc? > > Yeah, good idea. The gc module makes sense. > Does it? The gc module is specific to the cyclic-gc system. I don't se

Re: [Python-Dev] refleaks and caches

2008-01-28 Thread Christian Heimes
Jeroen Ruigrok van der Werven wrote: > -On [20080128 03:13], Christian Heimes ([EMAIL PROTECTED]) wrote: >> Do the int/float free lists cause any trouble or can they eat lots of >> memory? > > I hope I am interpreting it correctly, but it seems > http://evanjones.ca/memoryallocator/ explanation on

Re: [Python-Dev] refleaks and caches

2008-01-28 Thread Jeroen Ruigrok van der Werven
-On [20080128 03:13], Christian Heimes ([EMAIL PROTECTED]) wrote: >Do the int/float free lists cause any trouble or can they eat lots of >memory? I hope I am interpreting it correctly, but it seems http://evanjones.ca/memoryallocator/ explanation on that still applies: "The worst offenders are in

Re: [Python-Dev] refleaks and caches

2008-01-27 Thread Christian Heimes
Neal Norwitz wrote: > I'm not sure we should expose an API to clear the cache, but I don't > have strong opinions either way. If we keep the ability to clear the > cache, should we also consider some control over the int/float > freelist? These are worse than the tuple/frame free lists since > in

Re: [Python-Dev] refleaks and caches

2008-01-27 Thread Christian Heimes
Brett Cannon wrote: > Ignoring whether this is the right thing to do, should this be in sys or in > gc? Yeah, good idea. The gc module makes sense. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pyt

Re: [Python-Dev] refleaks and caches

2008-01-27 Thread Brett Cannon
On Jan 27, 2008 3:37 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Phillip J. Eby wrote: > > Expose an API to clear the cache, and clear it at shutdown? It > > should probably be part of interpreter shutdown anyway. > > Good point. I've implemented PyType_ClearCache and exposed it via > sys._c

Re: [Python-Dev] refleaks and caches

2008-01-27 Thread Neal Norwitz
On Jan 27, 2008 3:37 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Phillip J. Eby wrote: > > Expose an API to clear the cache, and clear it at shutdown? It > > should probably be part of interpreter shutdown anyway. > > Good point. I've implemented PyType_ClearCache and exposed it via > sys._c

Re: [Python-Dev] refleaks and caches

2008-01-27 Thread Christian Heimes
Phillip J. Eby wrote: > Expose an API to clear the cache, and clear it at shutdown? It > should probably be part of interpreter shutdown anyway. Good point. I've implemented PyType_ClearCache and exposed it via sys._cleartypecache(). The function is called during finalization, too. Can somebody

Re: [Python-Dev] refleaks and caches

2008-01-27 Thread Phillip J. Eby
At 05:05 PM 1/26/2008 -0800, Neal Norwitz wrote: >Around Jan 13, the refleak hunting test that is reported on >python-checkins started to report refleaks on virtually every run. I >suspect this is due to r59944 (at 2008-01-13 16:29:41) which was from >patch #1700288 to cache methods. With this pa