A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2008-June/080578.html below:

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

[Python-Dev] C API for gc.enable() and gc.disable() [Python-Dev] C API for gc.enable() and gc.disable()"Martin v. Löwis" martin at v.loewis.de
Sat Jun 21 21:56:44 CEST 2008
Antoine Pitrou wrote:
> Le samedi 21 juin 2008 à 17:49 +0200, "Martin v. Löwis" a écrit : 
>> I don't think any strategies based on timing will be successful.
>> Instead, one should count and analyze objects (although I'm unsure
>> how exactly that could work).
> 
> Would it be helpful if the GC was informed of memory growth by the
> Python memory allocator (that is, each time it either asks or gives back
> a block of memory to the system allocator) ?

I don't see how. The garbage collector is already informed about memory
growth; it learns exactly when a container object is allocated or
deallocated. That the allocator then requests memory from the system
only confirms what the garbage collector already knew: that there are
lots of allocated objects. From that, one could infer that it might
be time to perform garbage collection - or one could infer that all
the objects are really useful, and no garbage can be collected.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4