[Python-Dev] C API for gc.enable() and gc.disable() (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Sat Jun 21 18:36:10 CEST 2008


I'm not sure I agree with this. GC IIRC was introduced primarily to alleviate long-term memory starvation.

I don't think that's historically the case. GC would not need to be generational if releasing short-lived objects shortly after they become garbage was irrelevant. Of course, it was always expected that much memory is released through mere reference counting, and that GC only kicks in "after some time". However "after some time" was changed from "after 5000 allocations" to "after 700 allocations" in


r17274 | jhylton | 2000-09-05 17:44:50 +0200 (Di, 05 Sep 2000) | 2 lines Geänderte Pfade: M /python/trunk/Modules/gcmodule.c

compromise value for threshold0: not too high, not too low


Regards, Martin



More information about the Python-Dev mailing list