Implement AllocVec/FreeVec replacement for KS1.3