Skip to content

Conversation

@arihant2math
Copy link
Collaborator

@arihant2math arihant2math commented Jan 28, 2025

This pr aims to be completed from scratch. It benefits from Traverse already existing.
This currently is a tracing stop-the-world gc, mainly because incremental garbage collecting is hard.
The general structure is based off of #4180 but the algorithm is not, as that pr had a blocking bug in it's algorithm.

@youknowone
Copy link
Member

youknowone commented Jan 28, 2025

Are you also interested in RC too? I wish we can try circ for RustPython because it fits well for RustPython's requirements.

https://crates.io/crates/circ

About GC, if we can use other library, that will be the best. I didn't compare the candidatse, but #4668 has a few links

@arihant2math
Copy link
Collaborator Author

arihant2math commented Jan 28, 2025

About GC, if we can use other library, that will be the best. I didn't compare the candidatse, but #4668 has a few links

I plan to try to use another crate for the actual meat of the algorithm as the main reason the previous PR failed was having a bug in the algorithm. I will look into the ones in the issue.

@arihant2math
Copy link
Collaborator Author

The main issue with using an external library is that we don't actually use Rc<T> or Arc<T>, making porting difficult.

@youknowone
Copy link
Member

When i looked in circ, it had internal crate ebr_impl. So it was adaptable for our own rc implementation.
Not sure it also fit for gc, not only rc

@arihant2math
Copy link
Collaborator Author

I think for now I will try pulling and running a modified GC algorithm from dumpster mostly because it does gc.

@arihant2math
Copy link
Collaborator Author

Ok so I've tried two approaches.

The first, which I didn't push up tried to simply port over the code from the previous pr, but that ran into tons of compiler errors.
The second, which I did push up tried to copy over parts of dumpster, and is facing less compile errors, but is missing some key parts.

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants