3 ms·
One use is tagged pointers, using the top unused address bits for e.g. type information (https://en.wikipedia.org/wiki/Tagged_pointer https://en.wikipedia.org/w
by andrewmu 9y ago
One use is tagged pointers, using the top unused address bits for e.g. type information (https://en.wikipedia.org/wiki/Tagged_pointer https://en.wikipedia.org/wiki/Tagged_pointer)
- FRex 9y agoLuaJIT is where I originally ran into this. It uses both NaN tagging with C doubles and tagged pointers with 64 bit pointers.
- nemanjaboric 9y agoWe're using this technique to stuff the file descriptor with the accompanying object for the epoll registration, so one can check if the (reusable) object was reused for something else while registered with other file descriptor in the epoll: https://github.com/sociomantic-tsunami/ocean/blob/ee4f78d527551c2034697a998a56abd19813ca4c/src/ocean/io/select/selector/EpollFdSanity.d#L60 https://github.com/sociomantic-tsunami/ocean/blob/ee4f78d527...