Avoid using alloca, which is not portable.