Well, Do you know the maximum size of the array *a priori*?  If you do, you can always allocate this space ahead of time....