You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am fairly certain that it is possible to write an allocator for rrb trees which uses a precise mark sweep garbage collector. We did it for 2-3 trees for a project and I don't see anything fundamentally different in rrb trees that would prevent it from working here as well. You just track all the root nodes using RAII and the rest of it is pretty obvious from there. The fact that all the allocations can be the same size makes it a lot easier.
The refcounting and ownership approach is almost certainly fine for my planned use case for immer (MVCC structures in a database) but I wanted to make sure y'all are aware that libgc isn't the only option for gc! If you are interested in this approach please let me know. Thanks!
The text was updated successfully, but these errors were encountered:
Yes, I am aware that libgc is not the only approach :)
I think that integrating a different GC though would need some work on immer side, because the current memory policy API is a bit limited (there is no way to RAII mark roots, etc.) I don't have in principle anything against integrating such work if that'd be useful for you!
I am fairly certain that it is possible to write an allocator for rrb trees which uses a precise mark sweep garbage collector. We did it for 2-3 trees for a project and I don't see anything fundamentally different in rrb trees that would prevent it from working here as well. You just track all the root nodes using RAII and the rest of it is pretty obvious from there. The fact that all the allocations can be the same size makes it a lot easier.
The refcounting and ownership approach is almost certainly fine for my planned use case for immer (MVCC structures in a database) but I wanted to make sure y'all are aware that libgc isn't the only option for gc! If you are interested in this approach please let me know. Thanks!
The text was updated successfully, but these errors were encountered: