Skip to content

Commit

Permalink
Fix #229
Browse files Browse the repository at this point in the history
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
  • Loading branch information
manoelcampos committed Mar 12, 2020
1 parent 8578967 commit a7cfe9e
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -68,8 +68,13 @@ private List<Pe> getTotalCapacityToBeAllocatedToVm(final List<Double> requestedM
return getHost().getWorkingPeList();
}

final List<Pe> freePeList = getHost().getFreePeList();
final List<Pe> selectedPes = new ArrayList<>();
final Iterator<Pe> peIterator = getHost().getFreePeList().iterator();
if(freePeList.isEmpty()){
return selectedPes;
}

final Iterator<Pe> peIterator = freePeList.iterator();
Pe pe = peIterator.next();
for (final double mips : requestedMips) {
if (mips <= pe.getCapacity()) {
Expand Down

0 comments on commit a7cfe9e

Please sign in to comment.