Calculate VM memory limit