summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-03-20 08:54:42 (GMT)
committerGitHub <noreply@github.com>2024-03-20 08:54:42 (GMT)
commit15309329b65a285cb7b3071f0f08ac964b61411b (patch)
tree83b5be564755d7ea396c76eda29e6d33faf535d9 /Doc
parentd5ebf8b71fd18d7a1f2f6b670a2c18749dc2b55e (diff)
downloadcpython-15309329b65a285cb7b3071f0f08ac964b61411b.zip
cpython-15309329b65a285cb7b3071f0f08ac964b61411b.tar.gz
cpython-15309329b65a285cb7b3071f0f08ac964b61411b.tar.bz2
GH-108362: Incremental Cycle GC (GH-116206)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.13.rst30
1 files changed, 30 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 0e04dcd..40e2e6a 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -111,6 +111,14 @@ Improved Error Messages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TypeError: split() got an unexpected keyword argument 'max_split'. Did you mean 'maxsplit'?
+Incremental Garbage Collection
+------------------------------
+
+* The cycle garbage collector is now incremental.
+ This means that maximum pause times are reduced
+ by an order of magnitude or more for larger heaps.
+
+
Other Language Changes
======================
@@ -350,6 +358,28 @@ fractions
sign handling, minimum width and grouping. (Contributed by Mark Dickinson
in :gh:`111320`.)
+gc
+--
+
+* The cyclic garbage collector is now incremental, which changes the meanings
+ of the results of :meth:`gc.get_threshold` and :meth:`gc.get_threshold` as
+ well as :meth:`gc.get_count` and :meth:`gc.get_stats`.
+* :meth:`gc.get_threshold` returns a three-tuple for backwards compatibility,
+ the first value is the threshold for young collections, as before, the second
+ value determines the rate at which the old collection is scanned; the
+ default is 10 and higher values mean that the old collection is scanned more slowly.
+ The third value is meangless and is always zero.
+* :meth:`gc.set_threshold` ignores any items after the second.
+* :meth:`gc.get_count` and :meth:`gc.get_stats`.
+ These functions return the same format of results as before.
+ The only difference is that instead of the results refering to
+ the young, aging and old generations, the results refer to the
+ young generation and the aging and collecting spaces of the old generation.
+
+In summary, code that attempted to manipulate the behavior of the cycle GC may
+not work exactly as intended, but it is very unlikely to harmful.
+All other code will work just fine.
+
glob
----