Introduce and use sws_allocVec().