some little fix on vi, begin malloc