cpython/Misc/NEWS.d/next/Core and Builtins/2024-01-07-04-22-51.gh-issue-108362.oB9Gcf.rst
2024-03-20 08:54:42 +00:00

12 lines
614 B
ReStructuredText

Implement an incremental cyclic garbage collector. By collecting the old
generation in increments, there is no need for a full heap scan. This can
hugely reduce maximum pause time for programs with large heaps.
Reduce the number of generations from three to two. The old generation is
split into two spaces, "visited" and "pending".
Collection happens in two steps::
* An increment is formed from the young generation and a small part of the pending space.
* This increment is scanned and the survivors moved to the end of the visited space.
When the collecting space becomes empty, the two spaces are swapped.