title: Is there a way to realloc memory for an array to allow adding additional values to the beginning?
body: <p>I need to pad the beginning of an existing array with zeros. My current method is to reallocate additional memory for the array, shift every value forward, and then add the zeros. </p>
  
  <p>This is very slow for very large arrays, so I was wondering if there is a method in C to re-allocate memory for the beginning of the array?</p>
  
  <p>For example, if the original size of the array n1=100, and I want to add npad=10 values, is there a way to reallocate such that the array[i] now points to the value previously stored at array[i-npad]?</p>
  
  <p>Not hopeful, but thanks in advance!</p>