????????????Alex???????Java????15?????????????????COBOL??Magik?????JVM ?????????????????Micro Focus??Java?????????????????У??????????????????????????????????????????????????????????????
?????????????????????TB??????PB??????JVM??????????潻???????д??????????????????????????????д??
????JVM??64λ?????????Щ????????
???????????????????????????????????????????????????????????32λ????????????????????????????????????????????????????????????????????????????????????????JVM???????64λ???????????64λ???????????С?????????????????У????????????С?????TB????PB??
??????????????????????RAM??????????????????????????????÷????Ч??
??????????????Java??MappedByteBuffer???????????????????????????????????ByteBuffer???????????????????????——???????????????????????RAM?С??????????????????????????????????????ByteBuffer???С??????Intger.MAX_VALUE?????????????ByteBuffer??????????檔?????????У????????40GB??
??????????????Mac???16GB??棬?????????????????

 

public MapperCore(String prefix?? long size) throws IOException {
coreFile = new File(prefix + getUniqueId() + ".mem");
// This is a for testing - to avoid the disk filling up
coreFile.deleteOnExit();
// Now create the actual file
coreFileAccessor = new RandomAccessFile(coreFile?? "rw");
FileChannel channelMapper = coreFileAccessor.getChannel();
long nChunks = size / TWOGIG;
if (nChunks > Integer.MAX_VALUE)
throw new ArithmeticException("Requested File Size Too Large");
length = size;
long countDown = size;
long from = 0;
while (countDown > 0) {
long len = Math.min(TWOGIG?? countDown);
ByteBuffer chunk = channelMapper.map(MapMode.READ_WRITE?? from?? len);
chunks.add(chunk);
from += len;
countDown -= len;
}
}

????????????????????洴????40GB MappedByteBuffer?????б???????д?????????????????????????????????????????????????????