Title: Add GC infrastructure: tracking bits, tp_clear by youknowone · Pull Request #6977 · RustPython/RustPython · GitHub
Open Graph Title: Add GC infrastructure: tracking bits, tp_clear by youknowone · Pull Request #6977 · RustPython/RustPython
X Title: Add GC infrastructure: tracking bits, tp_clear by youknowone · Pull Request #6977 · RustPython/RustPython
Description: GC bit operations (_PyObject_GC_TRACK/UNTRACK equivalent): Add set_gc_bit() helper for atomic GC bit manipulation Add set_gc_tracked() / clear_gc_tracked() methods Update is_gc_tracked() to use GcBits::TRACKED flag Call set_gc_tracked() in track_object() Call clear_gc_tracked() for static types (they are immortal) tp_clear infrastructure (for breaking reference cycles): Add try_clear_obj() function to call payload's try_clear Add clear field to PyObjVTable Add clear() method to PyType's Traverse impl Summary by CodeRabbit Bug Fixes Enhanced garbage collection system to more effectively detect and break circular references, improving memory management and reducing potential memory leaks. Improved object deallocation process to ensure proper cleanup of child references before memory is freed. Strengthened object tracking mechanisms to better identify objects requiring garbage collection.
Open Graph Description: GC bit operations (_PyObject_GC_TRACK/UNTRACK equivalent): Add set_gc_bit() helper for atomic GC bit manipulation Add set_gc_tracked() / clear_gc_tracked() methods Update is_gc_tracked() to use Gc...
X Description: GC bit operations (_PyObject_GC_TRACK/UNTRACK equivalent): Add set_gc_bit() helper for atomic GC bit manipulation Add set_gc_tracked() / clear_gc_tracked() methods Update is_gc_tracked() to use Gc...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6977
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:866b60cf-2313-f990-b81f-01c50ede9946 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A1B2:1ABD8E:15D3605:1C91006:6A5C62EB |
| html-safe-nonce | 4b042213e9c4d0f2850a4dac93f698588b2865650285d0e6ec3680fdf1da11ea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUIyOjFBQkQ4RToxNUQzNjA1OjFDOTEwMDY6NkE1QzYyRUIiLCJ2aXNpdG9yX2lkIjoiNDYyNzM0NjE1NzA0Nzg5NzQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d29a69af32c04ae2af84f8da51ad2668529a6fdd958efd5020bcfa2be9ddb627 |
| hovercard-subject-tag | pull_request:3240182766 |
| 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/6977/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 | GC bit operations (_PyObject_GC_TRACK/UNTRACK equivalent): Add set_gc_bit() helper for atomic GC bit manipulation Add set_gc_tracked() / clear_gc_tracked() methods Update is_gc_tracked() to use Gc... |
| 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