Implement alloc instruction.