Returns the buffer size override if it is specified in the system property,
otherwise returns the default value.
487124
@Deprecated
    public static int getStreamBufferSize() {
        int streamBufferSize = DEFAULT_STREAM_BUFFER_SIZE;
        String bufferSizeOverride =
            System.getProperty(SDKGlobalConfiguration.DEFAULT_S3_STREAM_BUFFER_SIZE);

        if (bufferSizeOverride != null) {
            try {
                streamBufferSize = Integer.parseInt(bufferSizeOverride);
            } catch (Exception e) {
                log.warn("Unable to parse buffer size override from value: " + bufferSizeOverride);
            }
        }
        return streamBufferSize;
    }
911606
public Pair<Integer, Integer> getMinSizeAndSizeOfInBuffer(int executionThreadsCount) {
        // 20% percent of executionThreadsCount, but bigger than 1
        int defaultMinInBufferSize = Math.max(1, executionThreadsCount / 5);
        int minInBufferSizeLocal = getInteger(WORKER_INBUFFER_MIN_SIZE, defaultMinInBufferSize);
        int minInBufferSize = (minInBufferSizeLocal > 0) ? minInBufferSizeLocal : defaultMinInBufferSize;

        int defaultNewInBufferSize = (executionThreadsCount == 1) ? 2 : ((3 * executionThreadsCount) / 2);
        int newInBufferSizeLocal = getInteger(WORKER_INBUFFER_SIZE, defaultNewInBufferSize);
        int newInBufferSize = (newInBufferSizeLocal > minInBufferSize) ? newInBufferSizeLocal : defaultNewInBufferSize;

        if (newInBufferSize <= minInBufferSize) {
            throw new IllegalStateException(
                    format("Value of property \"%s\" must be greater than the value of property \"%s\".",
                            WORKER_INBUFFER_SIZE, WORKER_INBUFFER_MIN_SIZE));
        }
        return new ImmutablePair<>(minInBufferSize, newInBufferSize);
    }
523064
public int getSize() {
        return (java.lang.Integer) getStateHelper().eval(PropertyKeys.size, Integer.MIN_VALUE);

    }
446873
private void resizeBuffer() {
        if (buffer == null) {
            buffer = new byte[getDefaultBufferSize()];
            pos = 0;
            readPos = 0;
        } else {
            byte[] b = new byte[buffer.length * DEFAULT_BUFFER_RESIZE_FACTOR];
            System.arraycopy(buffer, 0, b, 0, buffer.length);
            buffer = b;
        }
    }
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;
    }
1219917
def trace_set_buffer_capacity(self, size):
        
        cmd = enums.JLinkTraceCommand.SET_CAPACITY
        data = ctypes.c_uint32(size)
        res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data))
        if (res == 1):
            raise errors.JLinkException('Failed to set trace buffer size.')
        return None
473161
static String getORBgiopMaxMsgSize()
	{
		//	Check if already done
		if (orb_max_msg_size==null)
			if ((orb_max_msg_size=System.getProperty("ORBgiopMaxMsgSize"))==null)	//	From JVM property
				if ((orb_max_msg_size=System.getenv("ORBgiopMaxMsgSize"))==null)		//	From Environment property
					orb_max_msg_size = getFromEnvFile("ORBgiopMaxMsgSize");		//	From Environment file
		//	else
		return orb_max_msg_size;
	}
1322050
def get_memory_size(self):
        """"""
        n = sys.getsizeof(self)
        n += sys.getsizeof(self.padding)
        n += total_size(self.start_addr)
        n += total_size(self._buf)
        n += sys.getsizeof(self._offset)
        return n
447135
public static long getSizeOfPhysicalMemory() {
		// first try if the JVM can directly tell us what the system memory is
		// this works only on Oracle JVMs
		try {
			Class<?> clazz = Class.forName("com.sun.management.OperatingSystemMXBean");
			Method method = clazz.getMethod("getTotalPhysicalMemorySize");
			OperatingSystemMXBean operatingSystemMXBean = ManagementFactory.getOperatingSystemMXBean();

			// someone may install different beans, so we need to check whether the bean
			// is in fact the sun management bean
			if (clazz.isInstance(operatingSystemMXBean)) {
				return (Long) method.invoke(operatingSystemMXBean);
			}
		}
		catch (ClassNotFoundException e) {
			// this happens on non-Oracle JVMs, do nothing and use the alternative code paths
		}
		catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
			LOG.warn("Access to physical memory size: " +
					"com.sun.management.OperatingSystemMXBean incompatibly changed.", e);
		}

		// we now try the OS specific access paths
		switch (OperatingSystem.getCurrentOperatingSystem()) {
			case LINUX:
				return getSizeOfPhysicalMemoryForLinux();

			case WINDOWS:
				return getSizeOfPhysicalMemoryForWindows();

			case MAC_OS:
				return getSizeOfPhysicalMemoryForMac();

			case FREE_BSD:
				return getSizeOfPhysicalMemoryForFreeBSD();

			case UNKNOWN:
				LOG.error("Cannot determine size of physical memory for unknown operating system");
				return -1;

			default:
				LOG.error("Unrecognized OS: " + OperatingSystem.getCurrentOperatingSystem());
				return -1;
		}
	}
1291573
private void parseOutgoingBufferSize(Map<Object, Object> props) {
        Object value = props.get(HttpConfigConstants.PROPNAME_OUTGOING_HDR_BUFFSIZE);
        if (null != value) {
            try {
                this.outgoingHdrBuffSize = rangeLimit(convertInteger(value), HttpConfigConstants.MIN_BUFFER_SIZE, HttpConfigConstants.MAX_BUFFER_SIZE);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Config: Outgoing hdr buffer size is " + getOutgoingHdrBufferSize());
                }
            } catch (NumberFormatException nfe) {
                FFDCFilter.processException(nfe, getClass().getName() + ".parseOutgoingBufferSize", "1");
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Config: Invalid outgoing header buffer size; " + value);
                }
            }
        }
    }
966359
def get_default_padding(self):
        

        high = 1024 * 10 + self.size // 100  # 10 KiB + 1% of trailing data
        low = 1024 + self.size // 1000  # 1 KiB + 0.1% of trailing data

        if self.padding >= 0:
            # enough padding left
            if self.padding > high:
                # padding too large, reduce
                return low
            # just use existing padding as is
            return self.padding
        else:
            # not enough padding, add some
            return low
870179
public BufferSizePredictor getBufferSizePredictor(Class<?> type) {
      MarshallingType marshallingType = typeHints.get(type);
      if (marshallingType == null) {
         // Initialise with isMarshallable to null, meaning it's unknown
         marshallingType = new MarshallingType(null, new AdaptiveBufferSizePredictor());
         MarshallingType prev = typeHints.putIfAbsent(type, marshallingType);
         if (prev != null) {
            marshallingType = prev;
         } else {
            if (trace) {
               log.tracef("Cache a buffer size predictor for '%s' assuming " +
                     "its serializability is unknown", type.getName());
            }
         }
      }
      return marshallingType.sizePredictor;
   }
1308001
def GetByteSize(self):
    
    if not self.element_data_type_definition:
      return None

    if self.elements_data_size:
      return self.elements_data_size

    if not self.number_of_elements:
      return None

    element_byte_size = self.element_data_type_definition.GetByteSize()
    if not element_byte_size:
      return None

    return element_byte_size * self.number_of_elements
871981
private int slopSize(Versioned<Slop> slopVersioned) {
        int nBytes = 0;
        Slop slop = slopVersioned.getValue();
        nBytes += slop.getKey().length();
        nBytes += ((VectorClock) slopVersioned.getVersion()).sizeInBytes();
        switch(slop.getOperation()) {
            case PUT: {
                nBytes += slop.getValue().length;
                break;
            }
            case DELETE: {
                break;
            }
            default:
                logger.error("Unknown slop operation: " + slop.getOperation());
        }
        return nBytes;
    }
217607
public int getReplaceContextLength() {
		if (replaceContextLength == null) {
			int replacementOffset = getReplaceRegion().getOffset();
			ITextRegion currentRegion = getCurrentNode().getTextRegion();
			int replaceContextLength = currentRegion.getLength() - (replacementOffset - currentRegion.getOffset());
			this.replaceContextLength = replaceContextLength;
			return replaceContextLength;
		}
		return replaceContextLength.intValue();
	}
154760
def get_backbuffer_size(self):
        """"""
        vec = Vector2()
        vec.X = self.backbuffer.get_width()
        vec.Y = self.backbuffer.get_height()
        return vec
2357
static ByteBuffer getTemporaryDirectBuffer(int size) {
        BufferCache cache = bufferCache.get();
        ByteBuffer buf = cache.get(size);
        if (buf != null) {
            return buf;
        } else {
            // No suitable buffer in the cache so we need to allocate a new
            // one. To avoid the cache growing then we remove the first
            // buffer from the cache and free it.
            if (!cache.isEmpty()) {
                buf = cache.removeFirst();
                free(buf);
            }
            return ByteBuffer.allocateDirect(size);
        }
    }