string folding does not use realloc but malloc once