Java Chronicle Map 使用哪些特性来将数据写入内存映射文件?

huangapple go评论67阅读模式
英文:

What features of java chronicle map uses to write the data on memory mapped files

问题

Java chronicle maps/queues将数据写入堆外内存。我试图理解为实现这一目标使用了Java的哪些特性。我曾以为chronicle只处理不安全的API,但不安全的API主要用于CAS操作。Java chronicle在将数据写入内存映射文件时使用了哪些其他Java特性。

英文:

Java chronicle maps/queues write data off the heaps. I am trying to understand what features of java are being used in order to achieve this. I was in assumption that chronicle deals with unsafe API only but unsafe is mostly used in CAS operations. What other feature of java chronicle uses in order to write data into memory-mapped files.

答案1

得分: 1

Chronicle Queue 使用 Unsafe 进行 CAS、volatile 和顺序操作,访问数据时将其视为 longint 而不仅仅是 byte,以及使用 64 位地址访问,以便映射大内存区域。我们还使用本地调用来映射 64 位区域。

英文:

Chronicle Queue uses Unsafe for CAS, volatile and order operations, accessing data as long or int rather than just as bytes and 64-bit address access so we can map large regions of memory. We also use a native call to map 64-bit regions.

huangapple
  • 本文由 发表于 2020年8月8日 02:55:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/63307712.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定