code: public void allocateMemory(int memorySize) {
  	this.memorySize = memorySize;
  	memory = new PairDblInt[memorySize][numLabels];
  	
  	for (int i = 0; i < memorySize; i++) {
  	    for (int j = 0; j < numLabels; j++) {
  		memory[i][j] = new PairDblInt();
  	    }
  	}
      }
docs: Allocate memory.
  
  @param memorySize the memory size