FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-144960: Clarify GC threshold1 formula in set_threshold docs by Anandesh-Sharma · Pull Request #145285 · python/cpython · GitHub

Repository navigation

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 5 additions & 4 deletions Doc/library/gc.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ The :mod:`!gc` module provides the following functions:
by 10% since the last collection and the net number of object allocations
has not exceeded 40 times *threshold0*, the collection is not run.

The fraction of the old generation that is collected is **inversely** proportional
to *threshold1*. The larger *threshold1* is, the slower objects in the old generation
are collected.
For the default value of 10, 1% of the old generation is scanned during each collection.
The fraction of the old generation that is scanned during each collection is
``1 / (10 * threshold1)``, making it **inversely** proportional to *threshold1*.
The larger *threshold1* is, the slower objects in the old generation are collected.
For the default value of 10, this means approximately 1% of the old generation is
scanned during each collection.

*threshold2* is ignored.

Expand Down
Loading

Back | FazBrowse Home | New Git URL