code: static final int actLgResizeFactor(final long capBytes, final int lgArrLongs, final int preLongs,
        final int lgRF) {
      final int maxHTLongs = Util.floorPowerOf2(((int)(capBytes >>> 3) - preLongs));
      final int lgFactor = Math.max(Integer.numberOfTrailingZeros(maxHTLongs) - lgArrLongs, 0);
      return (lgFactor >= lgRF) ? lgRF : lgFactor;
    }
docs: Returns the actual log2 Resize Factor that can be used to grow the hash table. This will be
  an integer value between zero and the given lgRF, inclusive;
  @param capBytes the current memory capacity in bytes
  @param lgArrLongs the current lg hash table size in longs
  @param preLongs the current preamble size in longs
  @param lgRF the configured lg Resize Factor
  @return the actual log2 Resize Factor that can be used to grow the hash table