Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
store the VMs by their interface, not by their implementation
[simgrid.git] / src / simix / smx_vm.cpp
index e11f077..429bd5c 100644 (file)
@@ -40,9 +40,9 @@ void SIMIX_vm_start(sg_host_t vm)
   if (pm_ramsize && !pm_overcommit) { /* Only verify that we don't overcommit on need */
     /* Retrieve the memory occupied by the VMs on that host. Yep, we have to traverse all VMs of all hosts for that */
     long total_ramsize_of_vms = 0;
-    for (simgrid::surf::VirtualMachineImpl* ws_vm : simgrid::surf::VirtualMachineImpl::allVms_)
-      if (pm == ws_vm->getPm())
-        total_ramsize_of_vms += ws_vm->getRamsize();
+    for (simgrid::s4u::VirtualMachine* ws_vm : simgrid::surf::VirtualMachineImpl::allVms_)
+      if (pm == ws_vm->pimpl_vm_->getPm())
+        total_ramsize_of_vms += ws_vm->pimpl_vm_->getRamsize();
 
     if (vm_ramsize > pm_ramsize - total_ramsize_of_vms) {
       XBT_WARN("cannnot start %s@%s due to memory shortage: vm_ramsize %ld, free %ld, pm_ramsize %ld (bytes).",