Compute the size to grow to.

@param current Current size
@param requiredSize Required size
@return Size to allocate
180344
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;
  }
1300323
public static Validation<String> length(int minSize, int maxSize) {
        return moreThan(minSize).and(lessThan(maxSize));
    }
1104715
public void setStorageSize(java.util.Collection<Range> storageSize) {
        if (storageSize == null) {
            this.storageSize = null;
            return;
        }

        this.storageSize = new com.amazonaws.internal.SdkInternalList<Range>(storageSize);
    }
144695
public int totalSize() {
        int size = 0;
        for (F first: keySet()) {
            size += getCounter(first).size();
        }

        return size;
    }
462700
public final long getTotalSize()
    {
        long result = 0;
        result = result + _storedItemManager.getStatistics().getTotalSize();
        result = result + _unstoredItemManager.getStatistics().getTotalSize();
        return result;
    }
571883
@Override
    public int size() {
        Node h = putStack.get();
        int putStackSize = h == null ? 0 : h.size;
        return putStackSize + takeStackSize.get();
    }
749374
private boolean validateSize(Object validationObject, Annotation annotate)
    {

        if (checkNullObject(validationObject))
        {
            return true;
        }
        
        int objectSize = 0;
        int minSize = ((Size) annotate).min();
        int maxSize = ((Size) annotate).max();
        if (validationObject != null)
        {
            if (String.class.isAssignableFrom(validationObject.getClass()))
            {
                objectSize = ((String) validationObject).length();

            }
            else if (Collection.class.isAssignableFrom(validationObject.getClass()))
            {
                
                objectSize = ((Collection) validationObject).size();
            }
            else if (Map.class.isAssignableFrom(validationObject.getClass()))
            {
                objectSize = ((Map) validationObject).size();
            }
            else if (ArrayList.class.isAssignableFrom(validationObject.getClass()))
            {

                objectSize = ((ArrayList) validationObject).size();

            }
            else
            {
                throwValidationException(((Size) annotate).message());

            }
        }
        return objectSize <= maxSize && objectSize >= minSize;

    }
1126468
public void setStorageSize(java.util.Collection<Range> storageSize) {
        if (storageSize == null) {
            this.storageSize = null;
            return;
        }

        this.storageSize = new java.util.ArrayList<Range>(storageSize);
    }
1097537
int getSize() {
        int size = 8;
        if (value != 0) {
            cw.newUTF8("ConstantValue");
            size += 8;
        }
        if ((access & Opcodes.ACC_SYNTHETIC) != 0
                && (cw.version & 0xffff) < Opcodes.V1_5)
        {
            cw.newUTF8("Synthetic");
            size += 6;
        }
        if ((access & Opcodes.ACC_DEPRECATED) != 0) {
            cw.newUTF8("Deprecated");
            size += 6;
        }
        if (ClassReader.SIGNATURES && signature != 0) {
            cw.newUTF8("Signature");
            size += 8;
        }
        if (ClassReader.ANNOTATIONS && anns != null) {
            cw.newUTF8("RuntimeVisibleAnnotations");
            size += 8 + anns.getSize();
        }
        if (ClassReader.ANNOTATIONS && ianns != null) {
            cw.newUTF8("RuntimeInvisibleAnnotations");
            size += 8 + ianns.getSize();
        }
        if (attrs != null) {
            size += attrs.getSize(cw, null, 0, -1, -1);
        }
        return size;
    }
1348401
public function bufferSize($bufferSize = null)
    {
        if (!func_num_args($bufferSize)) {
            return $this->_bufferSize;
        }
        return $this->_bufferSize = $bufferSize;
    }
432515
private void growSize() {
		size++;

		if (size > maxSize) {
			if (keys.length == Integer.MAX_VALUE) {
				throw new IllegalStateException("Max capacity reached at size=" + size);
			}

			// Double the capacity.
			rehash(keys.length << 1);
		}
	}
964350
public CompletableFuture<Integer> getUserSize() {
        if (this.localEngine != null && this.sncpNodeAddresses == null) {
            return CompletableFuture.completedFuture(this.localEngine.getLocalUserSize());
        }
        tryAcquireSemaphore();
        CompletableFuture<Integer> rs = this.sncpNodeAddresses.queryKeysStartsWithAsync(SOURCE_SNCP_USERID_PREFIX).thenApply(v -> v.size());
        if (semaphore != null) rs.whenComplete((r, e) -> releaseSemaphore());
        return rs;
    }
195745
private void growTable() {

        final int oldLength      = states.length;
        final int[] oldKeys      = keys;
        final float[] oldValues = values;
        final byte[] oldStates   = states;

        final int newLength = RESIZE_MULTIPLIER * oldLength;
        final int[] newKeys = new int[newLength];
        final float[] newValues = new float[newLength];
        final byte[] newStates = new byte[newLength];
        final int newMask = newLength - 1;
        for (int i = 0; i < oldLength; ++i) {
            if (oldStates[i] == FULL) {
                final int key = oldKeys[i];
                final int index = findInsertionIndex(newKeys, newStates, key, newMask);
                newKeys[index]   = key;
                newValues[index] = oldValues[i];
                newStates[index] = FULL;
            }
        }

        mask   = newMask;
        keys   = newKeys;
        values = newValues;
        states = newStates;

    }
184128
public void incrementCurrentSize() throws SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "incrementCurrentSize");

        if (_currentTran != null)
        {
            _currentTran.incrementCurrentSize();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "incrementCurrentSize");
    }
354017
private void grow(int minCapacity) {
        // overflow-conscious code
        int oldCapacity = buf.length;
        int newCapacity = oldCapacity << 1;
        if (newCapacity - minCapacity < 0)
            newCapacity = minCapacity;
        if (newCapacity < 0) {
            if (minCapacity < 0) // overflow
                throw new OutOfMemoryError();
            newCapacity = Integer.MAX_VALUE;
        }
        buf = copyOf(buf, newCapacity);
    }
876478
protected int getSize()
   {      
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getSize");
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "getSize", ""+size);
      return size;
   }
90830
private void growToSize (int minCapacity) {
		if (minCapacity < 0) // overflow
			throw new GdxRuntimeException("Capacity upper limit exceeded.");
		int oldCapacity = queue.length;
		// Double size if small; else grow by 50%
		int newCapacity = (int)((oldCapacity < 64) ? ((oldCapacity + 1) * CAPACITY_RATIO_HI) : (oldCapacity * CAPACITY_RATIO_LOW));
		if (newCapacity < 0) // overflow
			newCapacity = Integer.MAX_VALUE;
		if (newCapacity < minCapacity) newCapacity = minCapacity;
		Object[] newQueue = new Object[newCapacity];
		System.arraycopy(queue, 0, newQueue, 0, size);
		queue = newQueue;
	}