[Python-Dev] Re: ... gcmodule.c,2.9,2.10

Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Sat, 2 Sep 2000 16:37:18 +0200 (CEST)


Neil Schemenauer wrote:
> 
> On Fri, Sep 01, 2000 at 10:24:46AM -0400, Jeremy Hylton wrote:
> > Even people who do have problems with cyclic garbage don't necessarily
> > need a collection every 100 allocations.  (Is my understanding of what
> > the threshold measures correct?)
> 
> It collects every net threshold0 allocations.  If you create and delete
> 1000 container objects in a loop then no collection would occur.
> 
> > But the difference in total memory consumption with the threshold at
> > 100 vs. 1000 vs. 5000 is not all that noticable, a few MB.

A few megabytes?  Phew! Jeremy -- more power mem to you!
I agree with Neil. 5000 is too high and the purpose of the inclusion
of the collector in the beta is precisely to exercise it & get feedback!
With a threshold of 5000 you've almost disabled the collector, leaving us
only with the memory overhead and the slowdown <wink>.

In short, bring it back to something low, please.

[Neil]
> A portable way to find the total allocated memory would be nice.
> Perhaps Vladimir's malloc will help us here.

Yep, the mem profiler. The profiler currently collects stats if
enabled. This is slow and unusable in production code. But if the
profiler is disabled, Python runs at full speed. However, the profiler
will include an interface which will ask the mallocs on how much real
mem they manage. This is not implemented yet... Maybe the real mem
interface should go in a separate 'memory' module; don't know yet.

-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252