[3] A significant example of the use of tagged pointers is the Objective-C runtime on iOS 7 on ARM64, notably used on the iPhone 5S.
Objective-C class pointers are 8-byte aligned freeing up an additional 3 bits of address space, and the tag fields are used for many purposes, such as storing a reference count and whether the object has a destructor.
[4][5] Early versions of macOS used tagged addresses called Handles to store references to data objects.
The high bits of the address indicated whether the data object was locked, purgeable, and/or originated from a resource file, respectively.
[6] Use of zero to represent a null pointer is extremely common, with many programming languages (such as Ada) explicitly relying on this behavior.
In theory, other values in an operating system-reserved block of logical memory could be used to tag conditions other than a null pointer, but these uses appear to be rare, perhaps because they are at best non-portable.
It is generally accepted practice in software design that if a special pointer value distinct from null (such as a sentinel in certain data structures) is needed, the programmer should explicitly provide for it.
In contrast, null pointers/sentinels provide only a finite number of tagged values distinct from valid pointers.
[8] In the following C code, the value of zero is used to indicate a null pointer: Here, the programmer has provided a global variable, whose address is then used as a sentinel: Assume we have a data structure table_entry that is always aligned to a 16 byte boundary.