Module blart::tagged_pointer

source ·
Expand description

A tagged pointer is a pointer (concretely a memory address) with additional data associated with it, such as an indirection bit or reference count. This additional data is often “folded” into the pointer, meaning stored inline in the data representing the address, taking advantage of certain properties of memory addressing.

In this case, the tagged pointer will take advantage of the alignment of the pointed-to type, so that it can store several bits of information. For a type with alignment A, the number of available bits is log_2(A).

Structs

  • A non-null pointer type which carries several bits of metadata.