📝Tagged pointer

Tagged pointer is a technique to pack additional information into a pointer value.

If all allocations are 4- or 8-bytes aligned, the low 2 or 3 bytes are always zero. Language runtime can use this information to cram additional information into a pointer—i.e., tag what pointer value actually means.

Example:

See also

Backlinks