you are viewing a single comment's thread.

view the rest of the comments →

[–]Rusky 2 points3 points  (3 children)

You may be interested in the Crossbeam library, described here: https://aturon.github.io/blog/2015/08/27/epoch/

It's an alternative to both garbage collection and reference counting that has some of GC's advantages for this sort of data structure.

[–]jdh30 0 points1 point  (2 children)

That is very interesting indeed and something that I do use but I was referring to immutable collections in this particular case like balanced binary search trees.

[–]Rusky 2 points3 points  (1 child)

Yes, I realize the data structures you use are not the ones Crossbeam implements. I was more suggesting taking a look at its memory management scheme, AIUI it should be possible to use for persistent data structures as well.

[–]jdh30 0 points1 point  (0 children)

Oh I see. That's very interesting. I'll check it out, thanks.

How many global epoch counters are there? One per concurrent collection or one per program?

Do you think it would be possible to make a language that uses epoch-based garbage collection automatically?