A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-December/059229.html below:

[Python-Dev] suggestion for smarter garbage collection in function of size (gc.set_collect_mem_growth(2))

[Python-Dev] suggestion for smarter garbage collection in function of size (gc.set_collect_mem_growth(2)) [Python-Dev] suggestion for smarter garbage collection in function of size (gc.set_collect_mem_growth(2))"Martin v. Löwis" martin at v.loewis.de
Thu Dec 29 00:28:38 CET 2005
Andrea Arcangeli wrote:
> If there's anybody willing to suggest the files to hook into (the
> location where the interpreter allocates all anonymous memory) and how
> to invoke gc.collect() from C, that would help. thanks!

It all happens in Modules/gcmodule.c:_PyObject_GC_Malloc. There are
per-generation counters; _PyObject_GC_Malloc increments the
generation 0 counter, and PyObject_GC_Del decreases it. The counters
of the higher generations are incremented when a lower collection
occurs.

One challenge is that PyObject_GC_Del doesn't know how large the memory
block is that is being released. So it is difficult to find out how
much memory is being released in the collection.

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