Title: Replace GC tracking HashSet with intrusive linked list by youknowone · Pull Request #7328 · RustPython/RustPython · GitHub
Open Graph Title: Replace GC tracking HashSet with intrusive linked list by youknowone · Pull Request #7328 · RustPython/RustPython
X Title: Replace GC tracking HashSet with intrusive linked list by youknowone · Pull Request #7328 · RustPython/RustPython
Description: Replace per-generation HashSet with intrusive doubly-linked lists for GC object tracking. Each PyInner now carries gc_pointers (prev/next) and gc_generation fields, enabling O(1) track/untrack without hashing. Add gc_pointers (Pointers) and gc_generation (u8) to PyInner Implement GcLink trait for intrusive list integration Replace generation_objects/permanent_objects/tracked_objects/finalized_objects HashSets with generation_lists/permanent_list LinkedLists Use GcBits::FINALIZED flag instead of finalized_objects HashSet Change default_dealloc to untrack directly before memory free Hold both src/dst list locks in promote_survivors to prevent race conditions with concurrent untrack_object calls Add pop_front to LinkedList for freeze/unfreeze operations Summary by CodeRabbit Refactor GC reworked to use intrusive linked lists for per-generation and permanent storage, and object layout now includes GC metadata to track generation and pointers; freeze/unfreeze and promotion flows reorganized for simpler, faster movement. Bug Fixes Synchronous untracking before deallocation and tightened collection/promotion/finalization flows reduce missed or incorrectly retained objects and improve GC reliability and determinism.
Open Graph Description: Replace per-generation HashSet with intrusive doubly-linked lists for GC object tracking. Each PyInner now carries gc_pointers (prev/next) and gc_generation fields, enabling O(1) track/untrack with...
X Description: Replace per-generation HashSet with intrusive doubly-linked lists for GC object tracking. Each PyInner now carries gc_pointers (prev/next) and gc_generation fields, enabling O(1) track/untrack with...
Opengraph URL: https://github.com/RustPython/RustPython/pull/7328
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d5044d02-a26a-d0b6-ef20-ff9da65b08a7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C6D2:251DF3:4CA294:659EB5:6A5BFCC2 |
| html-safe-nonce | 95a96b7f0a0a5d946aeabd74274e4b83f0fe10d4dfdedba3c84f7e2ea5b9a07f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkQyOjI1MURGMzo0Q0EyOTQ6NjU5RUI1OjZBNUJGQ0MyIiwidmlzaXRvcl9pZCI6IjYwOTE0OTMyNjM3NjQzNTYyOTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e22c2014e3d2bc622db6d03333a9f6a4d6a9723c347806902077e3c8707a2fc8 |
| hovercard-subject-tag | pull_request:3348281092 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/7328/files |
| twitter:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| og:image:alt | Replace per-generation HashSet with intrusive doubly-linked lists for GC object tracking. Each PyInner now carries gc_pointers (prev/next) and gc_generation fields, enabling O(1) track/untrack with... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width