News for hackers. Stuff that matters.
Re:Rust 1.50 by FuckButtons on Friday February 12, 2021 @12:49AM (#26111083)
This sounds like a really interesting idea that I hadn’t really encountered before. Do you have any suggestions for further reading?
Re:Rust 1.50 by masklinn on Friday February 12, 2021 @01:14AM (#26111178)
The second paragraph is pointer tagging, it’s used quite a bit, including in the upper bits for some (e.g. objc stashes the ref count in the class pointer).

I think Ocaml also does something interesting with integers, IIRC they’re 1 bit less than the normal range and a shift stores a flag in the freed low bit: if the bit is set it’s a shifted integer, otherwise it’s an unshifted pointer to an integer.