This is very similar to an old approach to LISP garbage collection. All of memory is a tree of small cells. You need to walk the the tree and don't have space for a stack of the links that got you to where you are. So you store the backlinks in the forward links by XORing the forward link with the backlink. As the tree-walker backs down the tree, the links are XORed again, restoring the forward link.