use alloca instead of malloc for command buffer allocation