private long getMemoryInGb() {
    long maxMemory = Runtime.getRuntime().maxMemory() / 1024L / 1024L / 1024L;
    return maxMemory <= 0L ? 1L : maxMemory;
  }
Get the maximal heap memory in GB. If it is less than 1GB it will be return 1GB.
olv-core/src/main/java/pl/otros/logview/gui/actions/ParseClipboard.java