Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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 has an overview of algorithms which don't move conservative roots (including never moving, as in Boehm-Demers-Weiser).



The 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.


Dang, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: