Java?????????????????????
???????????? ???????[ 2014/7/7 10:29:07 ] ????????Java ?????
????????????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?????б???????д?????????????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11