[Python-Dev] Improving the Python Memory Allocator

Rodrigo Dias Arruda Senra rodsenra at gpr.com.br
Mon Jan 24 15:21:52 CET 2005


[Evan Jones] :
--------------
> 2. Every N memory operations (or some other measurement of "time"), 
> reset this value and calculate a moving average of the number of pages. 
> This estimates the current memory requirements of the application.

 > The challenge is how to determine a good measurement of "time."
 > Ideally, if the application was idle for a while,
> you would perform some housekeeping like this. Does Python's cyclic 
> garbage collector currently do this? If so, I could hook this 
> "management" stuff on to its calls to gc.collect()

IMVHO, any measurement of "time" chosen would hurt performance of
non-memory greedy applications. OTOH, makes sense for the developers
of memory greedy applications (they should be aware of it <wink>)
to call gc.collect() periodically. Therefore, *hooking* gc.collect()
sounds about right to me, let the janitoring pace be defined by those
who really care about it.

Looking forward to see this evolve,
Senra

-- 
Rodrigo Senra
MSc Computer Engineer     rodsenra at gpr.com.br
GPr Sistemas Ltda       http://www.gpr.com.br



More information about the Python-Dev mailing list