public static boolean JVMSupportsLargeMappedFiles ( ) { String arch = System . getProperty ( "os.arch" ) ; if ( arch == null || ! arch . contains ( "64" ) ) { return false ; } if ( isWindows ( ) ) return false ; //TODO better check for 32bit JVM return true ; }
Check if large files can be mapped into memory . For example 32bit JVM can only address 2GB and large files can not be mapped so for 32bit JVM this function returns false .