title: Using the extra 16 bits in 64-bit pointers
body: <p>I read that <a href="https://stackoverflow.com/q/6716946/995714">a 64-bit machine actually uses only 48 bits of address</a> (specifically, I'm using Intel core i7).</p>
  
  <p>I would expect that the extra 16 bits (bits 48-63) are irrelevant for the address, and would be ignored. But when I try to access such an address I got a signal <code>EXC_BAD_ACCESS</code>.</p>
  
  <p>My code is:</p>
  
  <pre class="lang-c prettyprint-override"><code>int *p1 = &amp;val;
  int *p2 = (int *)((long)p1 | 1ll&lt;&lt;48);//set bit 48, which should be irrelevant
  int v = *p2; //Here I receive a signal EXC_BAD_ACCESS.
  </code></pre>
  
  <p>Why this is so? Is there a way to use these 16 bits?</p>
  
  <p>This could be used to build more cache-friendly linked list. Instead of using 8 bytes for next ptr, and 8 bytes for key (due to alignment restriction), the key could be embedded into the pointer.</p>