mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
12 lines
614 B
ReStructuredText
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.
|