Tagged pointer  From Wikipedia, the free encyclopedia Jump to:
navigation, search  In computer science, a tagged pointer is a
common example of a tagged union, where the primary type of data
to be stored in the union is a pointer. Often, the tag in a
tagged pointer will be "folded" into the data representing the
pointer, taking advantage of one of the following properties of
pointers:    • Pointers to certain types of data will often be
aligned to the size of the data (4 bytes, 8 bytes, etc.), which
leaves a few bits of the pointer unused. As long as code that
uses the pointer properly masks out these bits, the pointer can
be tagged with extra information.   • The virtual memory system
in most modern operating systems reserves a block of logical
memory around address 0 as unusable. This means that, for
example, a pointer to 0 is never a valid pointer and can be used
as a special null pointer value.  Null versus Aligned
Pointer[edit]  Use of 0 to represent a null pointer is extremely
common, with many programm