Stack with realloc and memcpy completed