-
Notifications
You must be signed in to change notification settings - Fork 27
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
A little writeup on the GC #11
Comments
Yes, right now its simple naive reference counting. I know this is a hot topic, since in the long run, garbage collection is a big question, as we've all heard how Clojure involves lots of short lived allocations and heavily relies on the JVM's status as a world class garbage collector, Our naive reference counting implementation will likely not stay. Currently there is also lots of indiscriminate copying going on that will also not stay. You'll notice me say in several comments on the project that I'm taking a much more iterative approach to this than I normally do, getting just a MVP version of each feature up and slowly improving each part as time goes on. I have several more sophisticated designs in mind, but I think it will be easier to make these sorts of decisions when there's enough of a prototype to really see all the constraints on the problem in a much more up-close and intimate way. |
Got it. Honestly, I think RC is a great starting point, and may even be Good Enough in the long term. After all, MacOS and iOS have been using it for a long time without major issues. |
I think, on the other hand that reference counting is fine, as long as we don't use it too much. For instance, in my opinion, it does not make any sense to wrap an integer (represented as This applies to any type which is smaller than a pointer, so integers, characters, booleans (maybe floats but not sure). A place where Also, we can guarantee that we won't have cycle referencing since that would require mutability. Clojure being functional, mutability does not exist. On the other hand, even if we use them only at the right place, |
There is https://www.mmtk.io/ which is written in Rust and has LXR. |
Hi! This is a neat project!
I'd like to understand how it handles memory management.
Thanks!
The text was updated successfully, but these errors were encountered: