@Override
  public int getBuildProcessHeapSize(final int javacPreferredHeapSize) {
    final int heapSize = myState.BUILD_PROCESS_HEAP_SIZE;
    if (heapSize != DEFAULT_BUILD_PROCESS_HEAP_SIZE) {
      return heapSize;
    }
    // compatibility with older builds: if javac is set to use larger heap, and if so, use it.
    return Math.max(heapSize, javacPreferredHeapSize);
  }
@Override
  public int getBuildProcessHeapSize(final int javacPreferredHeapSize)