code: public static int computeCapacity(double percentage, String mapName) {
      return computeCapacity(Runtime.getRuntime().maxMemory(), percentage, mapName);
    }
docs: Let t = percentage of max memory.
  Let e = round(log_2 t).
  Then, we choose capacity = 2^e/(size of reference),
  unless it is outside the close interval [1, 2^30].