varunv123 / cloudsim

Automatically exported from code.google.com/p/cloudsim
0 stars 0 forks source link

UtilizationModelPlanetLabInMemory: use a global constant to define the size of the data field #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Suggested by Seyed Saeid:

Fortunately I found the problem. In class UtilizationModelPlanetLabInMemory, 
size of data was specified 289 , this value was specified with this assumption 
that SCHEDULING_INTERVAL in "constant.java" is always 300 . As I had changed 
this variable to 100 thus it was leaded to stack overflow for data
--------------------------------------
public class UtilizationModelPlanetLabInMemory implements UtilizationModel {

    /** The scheduling interval. */
    private double schedulingInterval;

    /** The data (5 min * 288 = 24 hours). */
    private final double[] data = new double[289];
----------------------------------------------

Original issue reported on code.google.com by anton.be...@gmail.com on 9 Dec 2012 at 11:31

GoogleCodeExporter commented 8 years ago
Now UtilizationModelPlanetLabInMemory contains two constructors; One is the 
same as in the previous version and initializes data with 289. The other allows 
the size of the array to be determined.

Original comment by rodrigo.calheiros on 29 Apr 2013 at 4:19