public double getMaxMemory (){
        double maxMemory = 0;
        for(int i = 0; i<memory.length; i++){
            if(memory[i]>maxMemory)
                maxMemory = memory[i];
        }
        return maxMemory;
    }