title: Shrinking with realloc
body: <p>I encountered this small piece of code in <a href="https://stackoverflow.com/q/3788696/191776">this question</a>, &amp; wanted to know,</p>
  
  <p>Can the <code>realloc()</code> function ever move a memory block to another location, when the memory space pointed to is shrinked?</p>
  
  <pre><code>int * a = malloc( 10*sizeof(int) );
  int * b = realloc( a, 5*sizeof(int) );
  </code></pre>
  
  <p>If possible, under what conditions, can I expect <code>b</code> to have an address different from that in <code>a</code>? </p>