Author: Antonio Cuni <[email protected]>
Branch: extradoc
Changeset: r5931:249ded615a14
Date: 2019-01-03 13:57 +0100
http://bitbucket.org/pypy/extradoc/changeset/249ded615a14/
Log: try to integrate cfbolz's suggestions
diff --git a/blog/draft/2018-12-gc-disable/gc-disable.rst
b/blog/draft/2018-12-gc-disable/gc-disable.rst
--- a/blog/draft/2018-12-gc-disable/gc-disable.rst
+++ b/blog/draft/2018-12-gc-disable/gc-disable.rst
@@ -72,6 +72,13 @@
- ``gc.collect_step()`` is a new function which you can use to manually
execute a single incremental GC collection step.
+It is worth to specify that ``gc.disable()`` disables **only** the major
+collections, while minor collections still runs. Moreover, thanks to the
+JIT's virtuals, many objects with a short and predictable lifetime are not
+allocated at all. The end result is that most objects with short lifetime are
+still collected as usual, so the impact of ``gc.disable()`` on memory growth
+is not as bad as it could sound.
+
Combining these two functions, it is possible to take control of the GC to
make sure it runs only when it is acceptable to do so. For an example of
usage, you can look at the implementation of a `custom GC`_ inside pypytools_.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit