Use realloc for vector.