Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-128807: Add marking phase for free-threaded cyclic GC #128808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jan 15, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip: revert changes to gc_should_collect()
These are not strictly needed, simplify PR.
  • Loading branch information
nascheme committed Jan 14, 2025
commit 4f6e5390eaf3ff0739eb5dd5e9ab380cb24c041d
8 changes: 2 additions & 6 deletions 8 Python/gc_free_threading.c
Original file line number Diff line number Diff line change
Expand Up @@ -1599,15 +1599,11 @@ gc_should_collect(GCState *gcstate)
if (count <= threshold || threshold == 0 || !gcstate->enabled) {
return false;
}
#if 1 // disable to force more frequent collections
// Avoid quadratic behavior by scaling threshold to the number of live
// objects. A few tests rely on immediate scheduling of the GC so we ignore
// the scaled threshold if generations[1].threshold is set to zero.
if (count < gcstate->long_lived_total / 4 && gcstate->old[0].threshold != 0) {
return false;
}
#endif
return true;
return (count > gcstate->long_lived_total / 4 ||
gcstate->old[0].threshold == 0);
}

static void
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.