Refactor vmem allocation out to ioctl