3 ms·
> In a custom language, this can be implemented very easily following the approach outlined in this paper: Accurate garbage collection in an uncooperative envir
by hayley-patton 2y ago
> In a custom language, this can be implemented very easily following the approach outlined in this paper: Accurate garbage collection in an uncooperative environment.
Cheney's algorithm and conservative roots don't mix too easily, as you cannot move conservative roots: an integer which looks like a pointer shouldn't be changed by moving. https://dl.acm.org/doi/10.1145/2660193.2660198 https://dl.acm.org/doi/10.1145/2660193.2660198 has an overview of algorithms which don't move conservative roots (including never moving, as in Boehm-Demers-Weiser).
- sirwhinesalot 2y agoThe paper I linked is not the Boehm one, hence the "Accurate" in title (they got clever with it didn't they?), you need to use a shadow stack to store the roots, you can't use conservative stack scanning for the reasons you stated.
- hayley-patton 2y agoDang, it's the shadow stack paper, not the BDW one! Sorry, my comment doesn't apply to shadow stacks and thus doesn't apply to the article.