libvirt: Added support for memory allocation