docs: protected static int growSize(int current, int requiredSize) {
      // Double until 64, then increase by 50% each time.
      int newCapacity = ((current < 64) ? ((current + 1) << 1) : ((current >> 1) * 3));
      // overflow?
      if (newCapacity < 0) {
        throw new OutOfMemoryError();
      }
      if (requiredSize > newCapacity) {
        newCapacity = requiredSize;
      }
      return requiredSize;
    }