Wow. Neat trick and exactly the kind of thing I was looking for.
Thanks!
EDIT: Looks like this is the relevant paper from the Graal team: https://www.graalvm.org/resources/articles/binsweep.pdf