[Python-Dev] Improving the Python Memory Allocator (original) (raw)
Rodrigo Dias Arruda Senra rodsenra at gpr.com.br
Mon Jan 24 15:21:52 CET 2005
- Previous message: [Python-Dev] Improving the Python Memory Allocator
- Next message: [Python-Dev] Improving the Python Memory Allocator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[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 ) 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
- Previous message: [Python-Dev] Improving the Python Memory Allocator
- Next message: [Python-Dev] Improving the Python Memory Allocator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]