src/org/jnetpcap/nio/JMemory.java
private static long maxDirectoryMemoryDefault() {
		long max = Runtime.getRuntime().maxMemory();

		if (max > MAX_DIRECT_MEMORY_DEFAULT) {
			max = MAX_DIRECT_MEMORY_DEFAULT;
		}

		return max;
	}
/**
	 * Calculates the default value for max direct memory when 'nio.mx' system
	 * property is not given. The calculated value is the lower of either the
	 * constant {@link #MAX_DIRECT_MEMORY_DEFAULT} or '-Xmx' cmd option, if
	 * specified.
	 * <p>
	 * The reason for the complexity with this calcualtion and we just don't
	 * default to '-Xmx' or JVM deault, is that JVM on 64-bit system defaults to
	 * 512Mb, which way too much to also reserve our nio use. Without this
	 * algorithm, the combined total on 64-bit system is 1Gb of memory.
	 * </p>
	 * 
	 * @return the runtime default value for direct memory
	 */
Calculates the default value for max direct memory when 'nio.mx' system
property is not given. The calculated value is the lower of either the
constant  #MAX_DIRECT_MEMORY_DEFAULT or '-Xmx' cmd option, if
specified.

The reason for the complexity with this calcualtion and we just don't
default to '-Xmx' or JVM deault, is that JVM on 64-bit system defaults to
512Mb, which way too much to also reserve our nio use. Without this
algorithm, the combined total on 64-bit system is 1Gb of memory.

@return the runtime default value for direct memory
Calculates the default value for max direct memory when ' nio . mx ' system property is not given . The calculated value is the lower of either the constant #MAX_DIRECT_MEMORY_DEFAULT or ' - Xmx ' cmd option if specified . The reason for the complexity with this calcualtion and we just don ' t default to ' - Xmx ' or JVM deault is that JVM on 64 - bit system defaults to 512Mb which way too much to also reserve our nio use . Without this algorithm the combined total on 64 - bit system is 1Gb of memory . @return the runtime default value for direct memory
private static long maxDirectoryMemoryDefault() {
		long max = Runtime.getRuntime().maxMemory();
		if (max > MAX_DIRECT_MEMORY_DEFAULT) {
			max = MAX_DIRECT_MEMORY_DEFAULT;
		}
		return max;
	}
private static long maxDirectoryMemoryDefault ( ) { long max = Runtime . getRuntime ( ) . maxMemory ( ) ; if ( max > MAX_DIRECT_MEMORY_DEFAULT ) { max = MAX_DIRECT_MEMORY_DEFAULT ; } return max ; }
Calculates the default value for max direct memory when 'nio.mx' system
 property is not given.
Calculates the default value for max direct memory when ' nio . mx ' system property is not given .